wsdl2java: Two declarations cause a collision in the ObjectFactory class.
804936Oct 12 2010 — edited Oct 15 2010I 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.