Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

wsdl2java: Two declarations cause a collision in the ObjectFactory class.

804936Oct 12 2010 — edited Oct 15 2010
I am using Apache CXF wsdl2java tool to create client classes for a wsdl generated by microsoft .net webservice.
I get this error:

WSDLToJava Error: Thrown by JAXB : Two declarations cause a collision in the ObjectFactory class.

the generated wsdl have complexTypes and elements of the same name for many of its response objects.
For example:

<xs:complexType name="ResponseCode">
<xs:sequence>
<xs:element minOccurs="0" name="Code" type="xs:int"/>
<xs:element minOccurs="0" name="Description" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ResponseCode" nillable="true" type="tns:ResponseCode"/>

Does anyone know a solution for dealing with this so that wsdl2java will correctly generate client classes to talk to this server?
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 12 2010
Added on Oct 12 2010
1 comment
4,630 views