Jaxb. Problem in generating classes

I am using wsad 5.1.1 and java web services developers pack 1.5.
I am trying to generate classes from xml schema but i am getting following error. please help.
parsing a schema...
compiling a schema...
generated\impl\runtime\ContentHandlerAdaptor.java
generated\impl\runtime\GrammarInfo.java
generated\impl\runtime\SAXUnmarshallerHandler.java
generated\impl\runtime\GrammarInfoFacade.java
generated\impl\runtime\UnmarshallingEventHandlerAdaptor.java
generated\impl\runtime\SAXMarshaller.java
generated\impl\runtime\ValidatingUnmarshaller.java
generated\impl\runtime\AbstractUnmarshallingEventHandlerImpl.java
generated\impl\runtime\GrammarInfoImpl.java
generated\impl\runtime\Util.java
generated\impl\runtime\ValidationContext.java
generated\impl\runtime\UnmarshallerImpl.java
generated\impl\runtime\UnmarshallingEventHandler.java
generated\impl\runtime\NamespaceContext2.java
generated\impl\runtime\SAXUnmarshallerHandlerImpl.java
generated\impl\runtime\XMLSerializable.java
generated\impl\runtime\DefaultJAXBContextImpl.java
generated\impl\runtime\UnmarshallableObject.java
generated\impl\runtime\PrefixCallback.java
generated\impl\runtime\NamespaceContextImpl.java
generated\impl\runtime\ErrorHandlerAdaptor.java
generated\impl\runtime\ValidatableObject.java
generated\impl\runtime\Discarder.java
generated\impl\runtime\MSVValidator.java
generated\impl\runtime\UnmarshallingContext.java
generated\impl\runtime\ValidatorImpl.java
generated\impl\runtime\InterningUnmarshallerHandler.java
generated\impl\runtime\MarshallerImpl.java
generated\impl\runtime\XMLSerializer.java
generated\impl\CommentImpl.java
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
     at java.lang.reflect.Method.invoke(Method.java:391)
     at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.NullPointerException
     at com.ibm.nio.cs.SBCS_Encoder.canEncode(SBCS_Encoder.java:199)
     at com.sun.codemodel.JPackage$1.requireEscaping(JPackage.java:356)
     at com.sun.codemodel.util.UnicodeEscapeWriter.write(UnicodeEscapeWriter.java:28)
     at com.sun.codemodel.util.UnicodeEscapeWriter.write(UnicodeEscapeWriter.java:54)
     at com.sun.codemodel.util.UnicodeEscapeWriter.write(UnicodeEscapeWriter.java:66)
     at java.io.PrintWriter.newLine(PrintWriter.java(Compiled Code))
     at java.io.PrintWriter.println(PrintWriter.java(Compiled Code))
     at com.sun.codemodel.JFormatter.nl(JFormatter.java:159)
     at com.sun.codemodel.JPackageMemberClass.declare(JPackageMemberClass.java:60)
     at com.sun.codemodel.JPackage.build(JPackage.java:364)
     at com.sun.codemodel.JCodeModel.build(JCodeModel.java:157)
     at com.sun.tools.xjc.Driver.run(Driver.java:235)
     at com.sun.tools.xjc.Driver._main(Driver.java:80)
     at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
     at com.sun.tools.xjc.Driver$1.run(Driver.java:60)

Use the Sun 1.4.2 JDK instead of the IBM WSAD 5.1.1 built-in JDK.

Similar Messages

  • Problem to generate classes from a gsoap server's wsdl with wsimport

    Hello,
    I trie for a long time to generate my client classes from a wsdl file with wsimport. The wsdl file was generated by gsoap.
    Here, the wsdl file :
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="form"
    targetNamespace="https://enterprise-name-masked.com/form.wsdl"
    xmlns:tns="https://enterprise-name-masked.com/form.wsdl"
    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
    xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:generic="generic"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"
    xmlns:xmime4="http://www.w3.org/2004/11/xmlmime"
    xmlns:form="form"
    xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"
    xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <types>
    <schema targetNamespace="generic"
      xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
      xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:generic="generic"
      xmlns:xop="http://www.w3.org/2004/08/xop/include"
      xmlns:xmime4="http://www.w3.org/2004/11/xmlmime"
      xmlns:form="form"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="http://www.w3.org/2004/08/xop/include"/>
      <import namespace="http://www.w3.org/2004/11/xmlmime"/>
      <import namespace="http://www.w3.org/2003/05/soap-encoding"/>
      <simpleType name="service">
       <restriction base="xsd:string">
        <enumeration value="service-none"/><!-- enum const = 0 -->
        <enumeration value="service-ident"/><!-- enum const = 1 -->
        <enumeration value="service-pool"/><!-- enum const = 2 -->
        <enumeration value="service-hwr"/><!-- enum const = 3 -->
        <enumeration value="service-form"/><!-- enum const = 4 -->
        <enumeration value="service-document"/><!-- enum const = 5 -->
       </restriction>
      </simpleType>
      <simpleType name="result-code">
       <restriction base="xsd:string">
        <enumeration value="ok"/><!-- enum const = 0 -->
        <enumeration value="already-exists"/><!-- enum const = 1 -->
        <enumeration value="not-found"/><!-- enum const = 2 -->
        <enumeration value="cant-connect"/><!-- enum const = 3 -->
        <enumeration value="exception"/><!-- enum const = 4 -->
        <enumeration value="bad-conversion"/><!-- enum const = 5 -->
        <enumeration value="bad-values"/><!-- enum const = 6 -->
        <enumeration value="session-not-found"/><!-- enum const = 7 -->
        <enumeration value="initialization-failed"/><!-- enum const = 8 -->
       </restriction>
      </simpleType>
      <complexType name="result">
       <sequence>
         <element name="code" type="generic:result-code" minOccurs="1" maxOccurs="1"/>
         <element name="details" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
    </schema>
    <schema targetNamespace="form"
      xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
      xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:generic="generic"
      xmlns:xop="http://www.w3.org/2004/08/xop/include"
      xmlns:xmime4="http://www.w3.org/2004/11/xmlmime"
      xmlns:form="form"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified">
      <import namespace="http://www.w3.org/2004/08/xop/include"/>
      <import namespace="http://www.w3.org/2004/11/xmlmime"/>
      <import namespace="http://www.w3.org/2003/05/soap-encoding"/>
      <simpleType name="area-type">
       <restriction base="xsd:string">
        <enumeration value="area-type-text"/><!-- enum const = 0 -->
        <enumeration value="area-type-numeric"/><!-- enum const = 1 -->
        <enumeration value="area-type-date"/><!-- enum const = 2 -->
        <enumeration value="area-type-checkbox"/><!-- enum const = 3 -->
        <enumeration value="area-type-slider"/><!-- enum const = 4 -->
        <enumeration value="area-type-draw"/><!-- enum const = 5 -->
        <enumeration value="area-type-identifier"/><!-- enum const = 6 -->
       </restriction>
      </simpleType>
      <simpleType name="format">
       <restriction base="xsd:string">
        <enumeration value="A5"/><!-- enum const = 0 -->
        <enumeration value="A4"/><!-- enum const = 1 -->
        <enumeration value="A3"/><!-- enum const = 2 -->
        <enumeration value="A2"/><!-- enum const = 3 -->
        <enumeration value="A1"/><!-- enum const = 4 -->
        <enumeration value="A0"/><!-- enum const = 5 -->
       </restriction>
      </simpleType>
      <complexType name="area">
       <sequence>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="x" type="xsd:double" minOccurs="1" maxOccurs="1"/>
         <element name="y" type="xsd:double" minOccurs="1" maxOccurs="1"/>
         <element name="width" type="xsd:double" minOccurs="1" maxOccurs="1"/>
         <element name="height" type="xsd:double" minOccurs="1" maxOccurs="1"/>
         <element name="comments" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="area-type" type="form:area-type" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="area-with-string">
       <sequence>
         <element name="area" type="form:area" minOccurs="1" maxOccurs="1"/>
         <element name="string" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="area-with-integer">
       <sequence>
         <element name="area" type="form:area" minOccurs="1" maxOccurs="1"/>
         <element name="integer" type="xsd:int" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="area-with-range">
       <sequence>
         <element name="area" type="form:area" minOccurs="1" maxOccurs="1"/>
         <element name="lower" type="xsd:double" minOccurs="1" maxOccurs="1"/>
         <element name="upper" type="xsd:double" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="areas">
       <sequence>
         <element name="areas" type="form:area" minOccurs="0" maxOccurs="unbounded"/>
         <element name="string-areas" type="form:area-with-string" minOccurs="0" maxOccurs="unbounded"/>
         <element name="integer-areas" type="form:area-with-integer" minOccurs="0" maxOccurs="unbounded"/>
         <element name="range-areas" type="form:area-with-range" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
      </complexType>
      <complexType name="group">
       <sequence>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="areas" type="form:areas" minOccurs="1" maxOccurs="1"/>
         <element name="groups" type="form:group" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
      </complexType>
      <complexType name="background">
       <sequence>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="md5" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="mime" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="num-page" type="xsd:int" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="pattern-type">
       <sequence>
         <element name="print-once" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
         <element name="has-identifier" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="page">
       <sequence>
         <element name="num-page" type="xsd:int" minOccurs="1" maxOccurs="1"/>
         <element name="format" type="form:format" minOccurs="1" maxOccurs="1"/>
         <element name="is-portrait" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
         <element name="background" type="form:background" minOccurs="1" maxOccurs="1"/>
         <element name="areas" type="form:areas" minOccurs="1" maxOccurs="1"/>
         <element name="groups" type="form:group" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
      </complexType>
      <complexType name="document-new">
       <sequence>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="pattern-type" type="form:pattern-type" minOccurs="1" maxOccurs="1"/>
         <element name="form-pages" type="form:page" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
      </complexType>
      <complexType name="document">
       <sequence>
         <element name="uuid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="pattern-type" type="form:pattern-type" minOccurs="1" maxOccurs="1"/>
         <element name="form-pages" type="form:page" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
      </complexType>
      <complexType name="document-info">
       <sequence>
         <element name="uuid" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <element name="page-count" type="xsd:int" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <complexType name="Data">
       <sequence>
         <element ref="xop:Include" minOccurs="1" maxOccurs="1"/>
       </sequence>
         <attribute ref="xmime4:contentType" use="optional"/>
      </complexType>
      <complexType name="login-response">
       <sequence>
         <element name="result" type="generic:result" minOccurs="1" maxOccurs="1"/>
         <element name="session" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       </sequence>
      </complexType>
      <!-- operation request element -->
      <element name="login" type="xsd:string"/>
      <!-- operation request element -->
      <element name="password" type="xsd:string"/>
      <!-- operation response element -->
      <element name="result" type="generic:result"/>
      <!-- operation response element -->
      <element name="uuid" type="xsd:string"/>
      <!-- operation request element -->
      <element name="session" type="xsd:string"/>
      <!-- operation request element -->
      <element name="aform" type="form:document-new"/>
      <!-- operation response element -->
      <element name="form" type="form:document"/>
      <!-- operation request element -->
      <element name="md5" type="xsd:string"/>
      <!-- operation response element -->
      <element name="data" type="form:Data"/>
      <!-- operation response element -->
      <element name="exists" type="xsd:boolean"/>
      <!-- operation response element -->
      <element name="backgrounds" type="form:background"/>
      <!-- operation response element -->
      <element name="forms" type="form:document"/>
      <!-- operation response element -->
      <element name="forms-info" type="form:document-info"/>
    </schema>
    </types>
    <message name="login">
    <part name="login" element="form:login"/>
    <part name="password" element="form:password"/>
    </message>
    <message name="uuid-response">
    <part name="result" element="form:result"/>
    <part name="uuid" element="form:uuid"/>
    </message>
    <message name="quit">
    <part name="session" element="form:session"/>
    </message>
    <message name="response">
    <part name="result" element="form:result"/>
    </message>
    <message name="new-form">
    <part name="session" element="form:session"/>
    <part name="aform" element="form:aform"/>
    </message>
    <message name="free-form">
    <part name="session" element="form:session"/>
    <part name="uuid" element="form:uuid"/>
    </message>
    <message name="get-form">
    <part name="session" element="form:session"/>
    <part name="uuid" element="form:uuid"/>
    </message>
    <message name="document-response">
    <part name="result" element="form:result"/>
    <part name="form" element="form:form"/>
    </message>
    <message name="get-file">
    <part name="session" element="form:session"/>
    <part name="md5" element="form:md5"/>
    </message>
    <message name="data-response">
    <part name="result" element="form:result"/>
    <part name="data" element="form:data"/>
    </message>
    <message name="set-file">
    <part name="session" element="form:session"/>
    <part name="md5" element="form:md5"/>
    <part name="data" element="form:data"/>
    </message>
    <message name="file-exists">
    <part name="session" element="form:session"/>
    <part name="md5" element="form:md5"/>
    </message>
    <message name="exists-response">
    <part name="result" element="form:result"/>
    <part name="exists" element="form:exists"/>
    </message>
    <message name="list-form-backgrounds">
    <part name="session" element="form:session"/>
    <part name="uuid" element="form:uuid"/>
    </message>
    <message name="list-backgrounds-response">
    <part name="result" element="form:result"/>
    <part name="backgrounds" element="form:backgrounds"/>
    </message>
    <message name="list-forms">
    <part name="session" element="form:session"/>
    </message>
    <message name="list-forms-response">
    <part name="result" element="form:result"/>
    <part name="forms" element="form:forms"/>
    </message>
    <message name="list-forms-info">
    <part name="session" element="form:session"/>
    </message>
    <message name="list-forms-info-response">
    <part name="result" element="form:result"/>
    <part name="forms-info" element="form:forms-info"/>
    </message>
    <portType name="formPortType">
    <operation name="login">
      <documentation>Service definition of function form__login</documentation>
      <input message="tns:login"/>
      <output message="tns:uuid-response"/>
    </operation>
    <operation name="quit">
      <documentation>Service definition of function form__quit</documentation>
      <input message="tns:quit"/>
      <output message="tns:response"/>
    </operation>
    <operation name="new-form">
      <documentation>Service definition of function form__new_form</documentation>
      <input message="tns:new-form"/>
      <output message="tns:uuid-response"/>
    </operation>
    <operation name="free-form">
      <documentation>Service definition of function form__free_form</documentation>
      <input message="tns:free-form"/>
      <output message="tns:response"/>
    </operation>
    <operation name="get-form">
      <documentation>Service definition of function form__get_form</documentation>
      <input message="tns:get-form"/>
      <output message="tns:document-response"/>
    </operation>
    <operation name="get-file">
      <documentation>Service definition of function form__get_file</documentation>
      <input message="tns:get-file"/>
      <output message="tns:data-response"/>
    </operation>
    <operation name="set-file">
      <documentation>Service definition of function form__set_file</documentation>
      <input message="tns:set-file"/>
      <output message="tns:response"/>
    </operation>
    <operation name="file-exists">
      <documentation>Service definition of function form__file_exists</documentation>
      <input message="tns:file-exists"/>
      <output message="tns:exists-response"/>
    </operation>
    <operation name="list-form-backgrounds">
      <documentation>Service definition of function form__list_form_backgrounds</documentation>
      <input message="tns:list-form-backgrounds"/>
      <output message="tns:list-backgrounds-response"/>
    </operation>
    <operation name="list-forms">
      <documentation>Service definition of function form__list_forms</documentation>
      <input message="tns:list-forms"/>
      <output message="tns:list-forms-response"/>
    </operation>
    <operation name="list-forms-info">
      <documentation>Service definition of function form__list_forms_info</documentation>
      <input message="tns:list-forms-info"/>
      <output message="tns:list-forms-info-response"/>
    </operation>
    </portType>
    <binding name="form" type="tns:formPortType">
    <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="login">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="quit">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="new-form">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="free-form">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="get-form">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="get-file">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="set-file">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="file-exists">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="list-form-backgrounds">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="list-forms">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    <operation name="list-forms-info">
      <SOAP:operation style="rpc"/>
      <input>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </input>
      <output>
         <SOAP:body parts="parameters" use="literal" namespace="form"/>
      </output>
    </operation>
    </binding>
    <service name="form">
    <documentation>gSOAP 2.7.10 generated service definition</documentation>
    <port name="form" binding="tns:form">
      <SOAP:address location="https://enterprise-name-masked.com/cgi-bin/form.fcgi"/>
    </port>
    </service>
    </definitions>And here, you can find the generated errors :
    wsimport -s Sources -b http://www.w3.org/2004/08/xop/includ
    e -b http://www.w3.org/2004/11/xmlmime form.wsdl
    parsing WSDL...
    [WARNING] src-resolve: Cannot resolve the name 'xmime4:contentType' to a(n) 'attribute declaration' component.
      line 215 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl#types?schema2
    [WARNING] s4s-elt-invalid-content.1: The content of 'Data' is invalid.  Element 'attribute' is invalid, misplaced, or occurs too often.
      line 215 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl#types?schema2
    [WARNING] src-resolve.4.2: Error resolving component 'generic:result'. It was detected that 'generic:result' is in namespace 'generic', but components
    from this namespace are not referenceable from schema document 'file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP
    /WSImport/Test/Form/form.wsdl#types?schema2'. If this is the incorrect namespace, perhaps the prefix of 'generic:result' needs to be changed. If this
    is the correct namespace, then an appropriate 'import' tag should be added to 'file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Re
    cherche%20SOAP/WSImport/Test/Form/form.wsdl#types?schema2'.
      line 230 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl#types?schema2
    [WARNING] src-resolve: Cannot resolve the name 'xop:Include' to a(n) 'element declaration' component.
      line 213 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl#types?schema2
    [WARNING] Ignoring SOAP port "form": it uses non-standard SOAP 1.2 binding.
    You must specify the "-extension" option to use this binding.
      line 533 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl
    [WARNING] Service "form" does not contain any usable ports. try running wsimport with -extension switch.
      line 531 of file:/C:/Documents%20and%20Settings/Hopi_1/Mes%20documents/Alexandre/Recherche%20SOAP/WSImport/Test/Form/form.wsdl
    generating code...
    compiling code...Could you tell me how to correctly generate my classes in this case ?
    Thank you.
    Edited by: morphet on May 30, 2008 6:12 AM

    Alchemista,
    Not sure if you were able to solve your problem..but I was trying to do exactly what you were trying to do.. access a datasource from a simple Java client. However, you cannot do so by simply writing the Java class and running it. The simple Java client has to be deployed as a J2EE Application Client. The following tutorial shows how to create a J2EE Application Client using the non-J2EE Java class you have written.
    http://developer.java.sun.com/developer/technicalArticles/J2EE/appclient
    The article talks about accessing EJBs from a J2EE App. Client.. but since you only want to access the DataSource, just skip all the screens until it asks you to register the JNDI DataSource resources...
    Let me know if you have any questions. You can email me at [email protected]
    I hope this helps.

  • Problems generating classes with JAXB

    Does anyone know where there might be a list of known problems with generating classes from an xsd with JAXB? I have a very deep and pretty complicated xsd, and it seems some elements get generated correctly and some don't. It's very hard to find any pattern of why. Is there a limit to the number of levels deep it will go?

    Try here as well
    https://jaxb.dev.java.net/

  • Reusing JAXB generated classes for XSDs included in other XSDs

    Hi,
    I use xsds with jaxb in a number of related projects. To avoid duplication I've factored out commonly used elements into their own xsd in a separate project. I then include these in the xsds that need them.
    I generate classes with jaxb for each project. I'm now trying to get jaxb so far as to reuse the already generated classes for the common elements.
    For example: I have a general xsd Person.xsd for which I generate classes in common.xsd. I have another xsd Project.xsd that includes a reference to the Person element. When i let jaxb generate classes for Projects.xsd, it will also generate a project.xsd.PersonType and so on.
    Is there any way to tell JAXB to use the existing classes? I've played around with the <jxb:javaType> bindings, but I can't get it to work yet. It gives me a "bindings not used" warning and doesn't compile. Also, if this is in fact the way to go, what do I specify as the parseMethod and printMethod attributes for the javaType element?
    Thx for any help

    JAXB questions should be better directed to the users list of http://jaxb.dev.java.net/
    you should subscribe to the 'users' mailing list, then post a question there.
    Thank you!

  • How to use JAXB generated classes with SOAP

    hello,
    I have a library of JAXB generated classes for my web service. There is a Java class for each web method defined in my schema. For example, my getLocation method is mapped to GetLocation.class.
    However my web service is SOAP based, so I am having to manually strip off the SOAP elements to be able to unmarshall the getLocation xml to a GetLocation class.
    I am noticing a disconnect between JAXB and other Java SOAP and RPC libraries. Does anyone know how to create a JAXB class for SOAP Envelopes and Bodys? Does anyone have any ideas how to incorporate the existing Java web service libraries with JAXB?
    Thanks in advance.

    Have you found a method to integrate SAAJ and JAXB? Or
    is better to use SAAJ only ?If I had to choose I'd go with SAAJ. It seems to me that's theoretically possible to use JAXB classes with SAAJ but I imagine if it is possible it would be a big pain in the ass.

  • XML Schema Class Generator Problem compiling generated java programs

    Hi,
    I ran oracg on the po.xsd schema from X3Cs XML Schema Part 0: Primer which successfully generated the java codes. I ran into problems when I compile the generated classes. Here's what I'm getting:
    C:\oracle\xml\xdk\demo\java\classgen\Po2>javac -classpath ".;C:\oracle\xml/lib/xmlparserv2.jar;C:\oracle\xml/lib/xschema.jar;C:\oracle\xml/l
    ib/classgen.jar;.;C:\Program Files\VicunaJ521\java\lib\collections.jar;C:\Program Files\VicunaJ521\java\lib\vicunalite.jar;C:\Program Files\
    XConverter\XConverter.jar;C:\Program Files\XConverter\IDLGenerator.jar; c:\jdk1.2.2\lib\dt.jar;c:\jdk1.2.2\lib\jvm.jar;c:\jdk1.2.2\lib\tools
    .jar;c:\oracle\ora81\jdbc\lib\classes12.zip;c:\oracle\ora81\jdbc\nls_charset12.zip;C:\oracle\xml\lib\classgen.jar;C:\oracle\xml\lib\xmlparse
    rv2.jar" *.java
    .\types\PurchaseOrderType.java:75: Type expected.
    public void addComment(null.Comment thecomment)
    ^
    .\types\Items.java:141: Type expected.
    public void addComment(null.Comment thecomment)
    ^
    2 errors
    Running the demo which comes with oracles version of po.xsd was OK. What's the difference between the po.xsd from oracle and the po.xsd from W3C? Are there any W3C recommendation for XML Schema not supported by Oracle's class generator?

    Which po.xsd do you use? Would you post it?
    Thanks. Here's the copy of the po.xsd from the W3C website. (http://www.w3.org/TR/xmlschema-0/#po.xsd)
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:annotation>
    <xsd:documentation xml:lang="en">
    Purchase order schema for Example.com.
    Copyright 2000 Example.com. All rights reserved.
    </xsd:documentation>
    </xsd:annotation>
    <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
    <xsd:element name="comment" type="xsd:string"/>
    <xsd:complexType name="PurchaseOrderType">
    <xsd:sequence>
    <xsd:element name="shipTo" type="USAddress"/>
    <xsd:element name="billTo" type="USAddress"/>
    <xsd:element ref="comment" minOccurs="0"/>
    <xsd:element name="items" type="Items"/>
    </xsd:sequence>
    <xsd:attribute name="orderDate" type="xsd:date"/>
    </xsd:complexType>
    <xsd:complexType name="USAddress">
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="street" type="xsd:string"/>
    <xsd:element name="city" type="xsd:string"/>
    <xsd:element name="state" type="xsd:string"/>
    <xsd:element name="zip" type="xsd:decimal"/>
    </xsd:sequence>
    <xsd:attribute name="country" type="xsd:NMTOKEN"
    fixed="US"/>
    </xsd:complexType>
    <xsd:complexType name="Items">
    <xsd:sequence>
    <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="productName" type="xsd:string"/>
    <xsd:element name="quantity">
    <xsd:simpleType>
    <xsd:restriction base="xsd:positiveInteger">
    <xsd:maxExclusive value="100"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="USPrice" type="xsd:decimal"/>
    <xsd:element ref="comment" minOccurs="0"/>
    <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="partNum" type="SKU" use="required"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    <!-- Stock Keeping Unit, a code for identifying products -->
    <xsd:simpleType name="SKU">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="\d{3}-[A-Z]{2}"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:schema>

  • Specifying package structure and inheritance for jaxb generated classes ??

    Friends,
    Now I am tuned up with the sweet JAXB utility...
    I need answers to this..
    1. How do I specify a package structure in my generated java files?
    2. How do I specify inheritance heirarchy to my generated java files ?
    I assume, there must be some way of doing this, without opening the actuall source.
    any ideas ??
    Thanks
    Rakesh

    how about inheritance heirarchy ? What if i plan to include theses generated classes in my inheritance heirarchy ?
    Bhakti, any idea what is the final version release date ? I desperately need answer to this.
    Thanks
    Rakesh

  • JaxB returns incompatible type class

    Hi,
    I want to use JaxB to parse an XML inside an EJB. I got the eclipse plugin for doing that and exchanged delivered JaxB 2.1 with the one I found in NWDS 7.10 SP7 (JaxB 2.0).
    Generated Java Files show as comment: "This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs..."
    I get the same file structure as when I create web service stub in EJB with object factory and package info etc.
    When I run that on server I get:
    javax.ejb.EJBException: Exception raised from invocation of public
    de.aseaco.cf.uif.tree.xml.TreeType
    de.aseaco.cf.uif.tree.ejb.TreeHolderBean.loadTree(java.lang.String) method on bean instance
    de.aseaco.cf.uif.tree.ejb.TreeHolderBean @ 1a06a08f for bean
    uif.cf.aseaco.de/uif*annotation|uif.cf.aseaco.de~addin~tree.jar*annotation|TreeHolderBean;
    nested exception is:
    java.lang.ClassCastException: class javax.xml.bind.JAXBElement:library:jaxb20 @
    com.sap.engine.boot.loader.ResourceMultiParentClassLoader @ 10ed7f5c @ alive
    incompatible with class
    de.aseaco.cf.uif.tree.xml.TreeType:uif.cf.aseaco.de/uif @
    [email protected]2 @ alive
    TreeType is my generated class from JaxB, TreeHolderBean a stateless EJB calling the Unmarshaller.
    This JaxBElement I find in my generated ObjectFactory:
         * Create an instance of {@link JAXBElement }{@code <}{@link TreeType }{@code >}}
        @XmlElementDecl(namespace = "http://www.aseaco.de/tree_schema/", name = "tree")
        public JAXBElement<TreeType> createTree(TreeType value) {
            return new JAXBElement<TreeType>(_Tree_QNAME, TreeType.class, null, value);
    Such a statement I do not find in web service ObjectFactory... Can someone give me a hint, whats going wrong here?
    I tried to create a library DC with JaxB 2.1 jars and creating again with 2.1. I also tried to add the 2.1 libs directly in a libs folder of my DC, but it looks like it always references the server package.
    Thx,
    Frank

    The problem might be also in an order of references. It's important. Ensure that the reference to your JAXB libs is the first one in the EAR, before any other server components.
    I see two options how you can reference the JAXB libs in EAR:
    1) Create External Library project. Copy your JAXB libs into it, include the libs public part as ASSEMBLY. Build the DC and check that folder /gen/... contains the jars in the public part's folder.
    1.1) Reference the Ext Lib DC from your EAR, build the EAR and ensure that the JAXB libs contained inside.
    1.2) Deploy EAR and check it.
    2) Create Server Library project. Copy your JAXB libs into it, include the libs public part as COMPILATION. Build the DC and check that folder /gen/... contains the jars in the public part's folder.
    2.1) Reference the Ext Lib DC from your EAR, build the EAR and ensure that the JAXB libs is NOT contained inside.
    2.2) Deploy the Server Lib and the EAR and check it.
    BR, Sergei

  • JAXB problems unmarshalling

    I used xjc to generate a set of elements from the schema shown below:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="http://www.doc.state.nc.us/doccodes" xmlns="http://www.doc.state.nc.us/doccodes" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xsd:element name="codeTable" type="CodeTable"/>
         <xsd:element name="codeRequest" type="CodeRequest"/>
         <xsd:complexType name="CodeTable">
              <xsd:sequence>
                   <xsd:element name="codename" type="xsd:string"/>
                   <xsd:element name="codes" type="Codes"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="Codes">
              <xsd:sequence>
              <xsd:element name="code" type="Code" minOccurs="1" maxOccurs="unbounded"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="Code">
              <xsd:sequence>
                        <xsd:element name="identifier" type="xsd:string"/>
                        <xsd:element name="description" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
         <xsd:complexType name="CodeRequest">
              <xsd:sequence>
                   <xsd:element name="application" type="xsd:string"/>
                   <xsd:element name="token" type="xsd:string"/>
                   <xsd:element name="codename" type="xsd:string"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>
    I have successfully been able to marshall an xml file using the following code:
    jc = JAXBContext.newInstance( "nc.doc.nexus.code.jaxb.model");
    CodeTable codeTable = new CodeTable();
    Codes facilityCodes = new Codes();
    List<Code> codeList = facilityCodes.getCode();
    codeList.addAll(persistables); // where persistables is an ArrayList of Code objects
    codeTable.setCodes(facilityCodes);
    codeTable.setCodename("facilityCode");
    JAXBElement<CodeTable> codeTableElement = (new ObjectFactory()).createCodeTable(codeTable);
    Marshaller m = jc.createMarshaller();
    m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
    m.marshal(codeTableElement, System.out);
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    DocumentBuilder db;
    try {
    db = dbf.newDocumentBuilder();
    Document doc = db.newDocument();
    m.marshal(codeTableElement, doc);
    return doc;
    catch (ParserConfigurationException e) {
    The marshalling works just fine, and results in the following xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns1:codeTable xmlns="http://www.doc.state.nc.us/doccodes" xmlns:ns1="http://www.doc.state.nc.us/doccodes">
    <ns1:codename>
    facilityCode </ns1:codename>
    <ns1:codes>
    <ns1:code>
    <ns1:identifier>
    X001 </ns1:identifier>
    <ns1:description>
    DHO DISTRICT 1 </ns1:description>
    </ns1:code>
    <ns1:code>
    <ns1:identifier>
    X002 </ns1:identifier>
    <ns1:description>
    DHO DISTRICT 2 </ns1:description>
    </ns1:code>
    <ns1:code>
    <ns1:identifier>
    X003 </ns1:identifier>
    <ns1:description>
    DHO DISTRICT 3 </ns1:description>
    </ns1:code>
    </ns1:codes>
    </ns1:codeTable>
    My code to unmarshall this xml document is as follows:
    JAXBContext jc;
    try {
    jc = JAXBContext.newInstance( "nc.doc.nexus.code.jaxb.model");
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    JAXBElement<CodeTable> codeTableElement =
    (JAXBElement<CodeTable>)unmarshaller.unmarshal(aDocument);
    catch (JAXBException e) {
         throw new DeserializerException(e);
    Now the problem. When I attempt to unmarshall this xml, I get the following UnmarshalException:
    unexpected element (uri:"", local:"ns1:codeTable"). Expected elements are <{http://www.doc.state.nc.us/doccodes}codeRequest>,<{http://www.doc.state.nc.us/doccodes}codeTable>
    I've made countless attempts to alter the unmarshal code in an attempt to determine if I had just coded it wrong, or whether jaxb is not able to interpret namespaces or schemas correctly. I have to assume the latter at this point. Can anybody shed any light on this?
    By the way, below is the xjc generated class CodeTable:
    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b26-ea3
    // See http://java.sun.com/xml/jaxb
    // Any modifications to this file will be lost upon recompilation of the source schema.
    // Generated on: 2007.08.22 at 10:42:51 AM EDT
    package nc.doc.nexus.code.jaxb.model;
    import javax.xml.bind.annotation.AccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlType;
    import nc.doc.nexus.code.jaxb.model.CodeTable;
    import nc.doc.nexus.code.jaxb.model.Codes;
    * <p>Java class for CodeTable complex type.
    * <p>The following schema fragment specifies the expected content contained within this class.
    * <pre>
    * <complexType name="CodeTable">
    * <complexContent>
    * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    * <sequence>
    * <element name="codename" type="{http://www.w3.org/2001/XMLSchema}string"/>
    * <element name="codes" type="{http://www.doc.state.nc.us/doccodes}Codes"/>
    * </sequence>
    * </restriction>
    * </complexContent>
    * </complexType>
    * </pre>
    @XmlAccessorType(AccessType.FIELD)
    @XmlType(name = "CodeTable", propOrder = {
    "codename",
    "codes"
    public class CodeTable {
    @XmlElement(namespace = "http://www.doc.state.nc.us/doccodes")
    protected String codename;
    @XmlElement(namespace = "http://www.doc.state.nc.us/doccodes")
    protected Codes codes;
    * Gets the value of the codename property.
    * @return
    * possible object is
    * {@link String }
    public String getCodename() {
    return codename;
    * Sets the value of the codename property.
    * @param value
    * allowed object is
    * {@link String }
    public void setCodename(String value) {
    this.codename = value;
    * Gets the value of the codes property.
    * @return
    * possible object is
    * {@link Codes }
    public Codes getCodes() {
    return codes;
    * Sets the value of the codes property.
    * @param value
    * allowed object is
    * {@link Codes }
    public void setCodes(Codes value) {
    this.codes = value;
    }

    UPDATE: I changed the unmarshal code to unmarshal a File instead of a DOM Document, and it works. This is the revelation I was hoping not to come to. I really don't want to have to serialize my Document to a file and then unmarshal that file from disk. This would not be an acceptable solution for a large J2EE application with many web services servicing 10000 clients. Does anybody know why the unmarshal method that accepts a DOM Document does not work?

  • JAXB is not generating the setter method for my tag

    Hi,
    I am generating java classes form my .xsd file using JAXB.
    The xsd definition has defnes a Form as a sequence of FormElement, where FormElement is a choice of graphical components like text etc. Form can have 0 or unbounded elements of typeFormElement
    Example
    <xs:element ref="sswfm:FormElement" minOccurs="0" maxOccurs="unbounded"/>
    It is creating the getter method for this tag like this-
    java.util.List getFormElement();
    but does not create setter method, namely, setFormElements which I would like to use when marshalling from swing to XML.
    If i remove the maxOccurs="unbounded, it is creating the setter method for this tag.But i want to keep this tag as it it and needs the setter method also.
    What should i do? Has one tried this before. HELP if you can
    Thank you in advance.

    Hi RavindraKshirsagar,
    We have a problem like you faced. Our requirement is that, we need to generate dynamically the PERSON element in our javabean.
    <xs:element name='SERVICE_REQUESTER'>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref='ORGANIZATION' />
                        <xs:element ref='PERSON' maxOccurs='unbounded' />
                   </xs:sequence>
              </xs:complexType>
         </xs:element>For this maxOccurs, as JAXB is not generating any Setter Method. As we need to get data dynamically from external application. If you could help us in handling this case dynamically, it will be well and good.
    Please send us the script / code asap.

  • Problem to generate secret field with JHeadstart 10.1.3.1.0

    Hi,
    I'm experimentig the new version of Jheadstart and I have a problem to generate a JSF page with a secret field using the Oracle JHeadstart 10.1.3 Evaluation Version.
    In fact when I change the display filed in the jheadstart Application Definition Editor to "secret" and then try to generate
    jsf pages, i have this message error for both form and table layout :
    Could not instantiate JhsApplicationGenerator class: No bean named 'secretPGItemModel' is defined:
    org.springframework.beans.factory.xml.XmlBeanFactory defining beans [applicationLayoutGenerator,facesConfigGenerator,
    regionMetaDataProcessor,includesGenerator,menuGenerator,nlsGenerator,pageGenerator,treeGenerator,generatorContext,findPageNameFormat,
    findPage,wizardFindPage,formPageNameFormat,formPage,wizardFormPage,formRegionPage,wizardFormRegionPage,selectPageNameFormat,selectPage,
    wizardSelectPage,treeFormPage,treePage,tablePageNameFormat,tablePage,wizardTablePage,lovTablePage,parentShuttlePage,
    wizardParentShuttlePage,intersectionShuttlePage,wizardIntersectionShuttlePage,formPageComponent,tablePageComponent,
    selectPageComponent,parentShuttlePageComponent,intersectionShuttlePageComponent,pgItemModelHelper,textInputPGItemModel,
    dateFieldPGItemModel,dateTimeFieldPGItemModel,secretFieldPGItemModel,fileUploadPGItemModel,fileDownloadPGItemModel,imagePGItemModel,
    editorPGItemModel,displayFieldPGItemModel,dropDownListPGItemModel,checkBoxPGItemModel,radio-verticalPGItemModel,
    radio-horizontalPGItemModel,hiddenPGItemModel,lovPGItemModel,pgGroupModel,pgDynamicDomainModel,pgStaticDomainModel,
    pgItemRegionModel,pgGroupRegionModel,stackedPGRegionContainerModel,separatePagesPGRegionContainerModel,horizontalPGRegionContainerModel,
    verticalPGRegionContainerModel,searchManagedBeanModel,dependsOnItemManagedBeanModel,dependsOnSearchItemManagedBeanModel,
    lovItemManagedBeanModel,lovItemInTableManagedBeanModel,editorItemManagedBeanModel,lovItemInAdvancedSearchManagedBeanModel,
    lovItemInQuickSearchManagedBeanModel,lovPageManagedBeanModel,fileItemInTableManagedBeanModel,mediaItemInTableManagedBeanModel,
    checkboxInTableManagedBeanModel,treeManagedBeanModel,parentShuttleManagedBeanModel,intersectionShuttleManagedBeanModel,
    collectionModelManagedBeanModel,queryBindParamsManagedBeanModel,queryBindParamsDomainManagedBeanModel,defaultValuesManagedBeanModel,
    wizardPageManagedBeanModel,wizardPageListManagedBeanModel,breadcrumbManagedBeanModel,customManagedBeanModel,velocityInitializer,
    formGroupLayoutFactory,tableGroupLayoutFactory,table-formGroupLayoutFactory,select-formGroupLayoutFactory,tree-formGroupLayoutFactory,
    treeGroupLayoutFactory,parent-shuttleGroupLayoutFactory,intersection-shuttleGroupLayoutFactory,
    pgModelFactory,templateBindingsFactory,pgModelValidator]; root of BeanFactory hierarchy
    My Jdeveloper Version is : 10.1.3.0.4 (SU5)
    thanks

    Steven
    I followed your instructions and it works
    I recently downloaded the production version of JDeveloper Studio Edition Version 10.1.3.1.0.3984
    Build JDEVADF_10.1.3.1.0_NT_061009.1404.3984
    I installed JHeadstart evaluation version.
    I recreate the same example with this new version of JDeveloper
    I found the bean definition in the jag-config.xml (by default)
    I removed the "#ITEM_PARTIAL_TRIGGERS_PROP" from the template (default/item/form/formSecret.vm )
    I thought it will work but unfortunately it doesn't work and and I got the same error
    Could not instantiate JhsApplicationGenerator class: No bean named 'secretPGItemModel' is defined: org.springframework.beans.factory.xml.XmlBeanFactory defining beans [applicationLayoutGenerator,facesConfigGenerator,regionMetaDataProcessor,includesGenerator,menuGenerator,nlsGenerator,pageGenerator,treeGenerator,generatorContext,findPageNameFormat,findPage,wizardFindPage,formPageNameFormat,formPage,wizardFormPage,formRegionPage,wizardFormRegionPage,selectPageNameFormat,selectPage,wizardSelectPage,treeFormPage,treePage,tablePageNameFormat,tablePage,wizardTablePage,lovTablePage,parentShuttlePage,wizardParentShuttlePage,intersectionShuttlePage,wizardIntersectionShuttlePage,formPageComponent,tablePageComponent,selectPageComponent,parentShuttlePageComponent,intersectionShuttlePageComponent,pgItemModelHelper,textInputPGItemModel,dateFieldPGItemModel,dateTimeFieldPGItemModel,secretFieldPGItemModel,fileUploadPGItemModel,fileDownloadPGItemModel,imagePGItemModel,editorPGItemModel,displayFieldPGItemModel,dropDownListPGItemModel,checkBoxPGItemModel,radio-verticalPGItemModel,radio-horizontalPGItemModel,hiddenPGItemModel,lovPGItemModel,pgGroupModel,pgDynamicDomainModel,pgStaticDomainModel,pgItemRegionModel,pgGroupRegionModel,stackedPGRegionContainerModel,separatePagesPGRegionContainerModel,horizontalPGRegionContainerModel,verticalPGRegionContainerModel,searchManagedBeanModel,dependsOnItemManagedBeanModel,dependsOnSearchItemManagedBeanModel,lovItemManagedBeanModel,lovItemInTableManagedBeanModel,editorItemManagedBeanModel,lovItemInAdvancedSearchManagedBeanModel,lovItemInQuickSearchManagedBeanModel,lovPageManagedBeanModel,fileItemInTableManagedBeanModel,mediaItemInTableManagedBeanModel,checkboxInTableManagedBeanModel,treeManagedBeanModel,parentShuttleManagedBeanModel,intersectionShuttleManagedBeanModel,collectionModelManagedBeanModel,queryBindParamsManagedBeanModel,queryBindParamsDomainManagedBeanModel,defaultValuesManagedBeanModel,wizardPageManagedBeanModel,wizardPageListManagedBeanModel,breadcrumbManagedBeanModel,customManagedBeanModel,velocityInitializer,formGroupLayoutFactory,tableGroupLayoutFactory,table-formGroupLayoutFactory,select-formGroupLayoutFactory,tree-formGroupLayoutFactory,treeGroupLayoutFactory,parent-shuttleGroupLayoutFactory,intersection-shuttleGroupLayoutFactory,pgModelFactory,templateBindingsFactory,pgModelValidator]; root of BeanFactory hierarchy

  • Namespace issue with oracg generated classes

    Hi,
    I'm having problems generating classes with oracg from the Java Xdk from an XML schema. All classes are generated, but do not compile. In some sources (mostly in the type classes) "public void addSomething(null.Something theSomething)" is generated as the method declaration, and that doesn't compile. When I add a targetnamespace to the xsd file, the generated sources compile (the 'null.' is replaced with 'myPackage.', but when I generate an XML document, I contains a namespace reference (ns1) like this:
    <ns1:Note xmlns:ns1 = "http://www.somewhere.org">
    <ns1:Form>
    <ns1:Reference>
    <ns1:ReferenceNbr>1</ns1:ReferenceNbr>
    <ns1:ReferenceType>1</ns1:ReferenceType>
    </ns1:Reference>
    </ns1:Form>
    </ns1:Note>
    What I want is this:
    <Note>
    <Form>
    <Reference>
    <ReferenceNbr>1<ReferenceNbr>
    <ReferenceType>1<ReferenceType>
    </Reference>
    </Form>
    </Note>
    How can I get this result ?
    Kind regards.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

  • How to change generated class name when create binding files.

    I have a dtd file, which has lines like this:
    <!ELEMENT rights (
         %plain-text;
         | rights.owner
         | rights.startdate
         | rights.enddate
         | rights.agent
         | rights.geography
         | rights.type
         | rights.limitations
         )*>
         <!ELEMENT rights.type (%plain-text;)*>
    when i use xjc to create binding files, I got an error:
    trying to create the same field twice: value.
    I suspect that the reason is because the name of rights and rights.type.
    so, i'd like to know how can i control the generated class name. for example, i want to generate a class RightTypeEle for element rights.type. how can do that?
    btw, i use latest version of jaxb.
    Thanks in advance.

    hi Vincentq,
    What function are you using to create the attachment?  Have you looked at SAP_WAPI_ATTACHMENT_ADD?
    Cheers,
    Sue

  • Problem in generate Java  from PL SQL package in Jdeveloper

    Hi
    i have problem in create java class from PL SQL package in JDeveloper.
    I use Database navigator of jdeveloper and right click on a package and choose Generate Java then in Jpublisher window choose my view Controller and accept other default values.
    I call methods of generated class in the Action of a button in my JSP page, but when I click the button it  throw null pointer exception !!! i fund one of generated method return null and it lead to this exception.
    protected DefaultContext __tx = null;
    public DefaultContext getConnectionContext() throws SQLException  {
    if (__tx==null){
    __tx = (getConnection()==null) ? DefaultContext.getDefaultContext() : new DefaultContext(getConnection());
        return __tx;
      public Connection getConnection() throws SQLException
        if (__onn!=null) return __onn;
         else if (__tx!=null) return __tx.getConnection();
         else if (__dataSource!=null) __onn= __dataSource.getConnection();
         return __onn;
    i try to generate class in Model project and create DataControl for that and use method action but noting change and i get null pointer again!!
    Jdeveloper Versino = 11.1.1.7.0

    Let me ask you another question: Why do you generate java from the package at all?
    Where do you want to call the package?
    Back to your question: you should see code like
        public void setDataSourceLocation(String dataSourceLocation) throws SQLException {
            javax.sql.DataSource dataSource;
            try {
                Class cls = Class.forName("javax.naming.InitialContext");
                Object ctx = cls.newInstance();
                java.lang.reflect.Method meth = cls.getMethod("lookup", new Class[] { String.class });
                dataSource = (javax.sql.DataSource) meth.invoke(ctx, new Object[] { "java:comp/env/" + dataSourceLocation });
                setDataSource(dataSource);
            } catch (Exception e) {
                throw new java.sql.SQLException("Error initializing DataSource at " + dataSourceLocation + ": " + e.getMessage());
    in the generated code. This code look up a datasource (which you have defined e.g. on the Weblogic Server) by calling the method
    setDataSourceLocaltion("jdbc/HRConnDS");
    This look up the datasource nad stores it in the class variable.
    Timo

  • Problems with inner classes in JasminXT

    I hava problems with inner classes in JasminXT.
    I wrote:
    ;This is outer class
    .source Outer.j
    .class Outer
    .super SomeSuperClass
    .method public createrInnerClass()V
         .limit stack 10
         .limit locals 10
         ;create a Inner object
         new Outer$Inner
         dup
         invokenonvirtual Outer$Inner/<init>(LOuter;)V
         ;test function must print a Outer class name
         invokevirtual Outer$Inner/testFunction ()V
    .end method
    ;This is inner class
    .source Outer$Inner.j
    .class Outer$Inner
    .super java/lang/Object
    .field final this$0 LOuter;
    ;contructor
    .method pubilc <init>(LOuter;)V
         .limit stack 10
         .limit locals 10
         aload_0
         invokenonvirtual Object/<init>()V
         aload_0
         aload_1
         putfield Inner$Outer/this$0 LOuter;
         return
    .end method
    ;test
    .method public testFunction ()V
         .limit stack 10
         .limit locals 10
         ;get out object
         getstatic java/io/PrintStream/out  java/io/PrintStream;
         aload_0
         invokevirtual java/lang/Object/getClass()java/lang/Class;
         ;now in stack Outer$Inner class
         invokevirtual java/Class/getDeclaringClass()java/lang/Class;
         ;but now in stack null
         invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
    .end methodI used dejasmin. Code was equal.
    What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
    it returns Outer class?

    Outer$Inner naming convention is not used by JVM to get declaring class.
    You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
    in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute?

Maybe you are looking for

  • Unable to implement WOOgnl parser in my WO application on WO5.4.

    Eclipse Version: Juno Service Release 1 java version: 1.6.0_18 WebObject Version = 5.4.3 Steps I am using to implement WOOgnl Parser:- 1- I have imported WOOgnl.framework in build path 2- I have made following changes to build.properties file ognl.ac

  • My video can't export cause of render problems!

    Hi there, I am trying to export my video as a digital video (.dv) but when I do it says it can't find a render file. I have gone to Sequence->Render All->Both. Renders the whole video then I go to export it and it still says that some render file is

  • TS3694 when a 1015 code pops up and you are trying to update your software what can you do?

    when a 1015 code pops up and you are trying toupdate your software on your 3G iphone how can you go about fixing that?

  • Major problems after installing itunes 8

    after installing itunes 8 wanted to update my itouch to latest version. Itunes and Vista PC is now always crashing and harddisk dumps, can't use my Itouch anymore cause Vista PC always crashing during update o Itouch. Also major system dumps as soon

  • Query regarding query

    Hi All, I am developing infoset in query using sq02. There i have added one additional field 'gross value' and table as vbak.This gross value is nothing but the total of total value of each material in each line item of sales order after adding taxes