On Thu, Oct 29, 2009 at 12:28 PM, Matthew McKenna <mtmckenna...@mac.com>wrote:

> Hello-
>
> I have a WSDL file that imports several XML schemas.  One of those schemas
> has the following:
>
> <xs:element name="ITEM-ID">
>  <xs:complexType>
> <xs:sequence maxOccurs="unbounded">
> <xs:element ref="emsg:Item-Id"/>
> </xs:sequence>
>   </xs:complexType>
> </xs:element>
>
> followed very closely by:
>
> <xs:element name="Item-Id">
> <xs:complexType>
> <xs:simpleContent>
> <xs:extension base="xs:string">
> <xs:attribute name="Type" use="required">
> <xs:simpleType>
> <xs:restriction base="xs:NMTOKEN">
> <xs:enumeration value="14"/>
> <xs:enumeration value="SA"/>
> <xs:enumeration value="VN"/>
> <xs:enumeration value="CR"/>
> <xs:enumeration value="ON"/>
> <xs:enumeration value="PK"/>
> <xs:enumeration value="TG"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
> </xs:element>
>
> In order to generate the appropriate Java code, I am using the following in
> my build.xml file:
>
>    <taskdef name="wsdl2java"
> classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask">
>        <classpath refid="cp"/>
>    </taskdef>
>
>    <target name="generateJavaFromWSDL" depends="prepare">
>        <echo message="Running Axis WSDL2Java tool"/>
>        <wsdl2java url="${wsdlpath}/XXXXX.wsdl"
>                output="generated/src"
>            serverSide="false"
>                all="true"
>         wraparrays="true"
>            verbose="true">
>            <mapping namespace="${XXXXA-namespace}"
>  package="${XXXXA-package-name}"/>
>            <mapping namespace="${services-namespace}"
> package="${services-package-name}"/>
>            <mapping namespace="${exchange-namespace}"
> package="${exchange-package-name}"/>
>            <mapping namespace="${types-namespace}"
> package="${types-package-name}"/>
>        </wsdl2java>
>    </target>
>
>
> The problem I am running in to is that wsdl2java generates a ITEMID.java
> file, but the class declaration
> and constructor are ItemId.  All references to the ITEMID object in other
> generated code 'cannot be resolved'.
>
> My question - Is there some way I can generate the two item id objects?
>
> Thanks very much for any assistance.
>

this seems to be a problem with ADB. please log a jira with your wsdl file.

try with another databinding framework eg -d xmlbeans, -d jaxbri

thanks,
Amila.

>
> Matthew McKenna
> mtmckenna...@mac.com
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to