I'm dealing with a remote WSDL in which some XSD are invoked twice. I'm trying to use xjb binding to get rid of
'EndpointReference' is already defined
riga 22 di file:...../wsdl/ws-addr.xsd(related to above error) the first definition appears here riga 22 di file:...../wsdl/www.w3.org/2006/03/addressing/ws-addr.xsd
This is part of the XSD
<xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
<xs:complexType name="EndpointReferenceType" mixed="false">
<xs:sequence>
<xs:element name="Address" type="tns:AttributedURIType"/>
<xs:element ref="tns:ReferenceParameters" minOccurs="0"/>
<xs:element ref="tns:Metadata" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
and this is the jxb binding
<bindings schemaLocation="wsdl/ws-addr.xsd" version="1.0">
<!-- Customise the package name -->
<schemaBindings>
<package name="com.example.schema"/>
</schemaBindings>
<!-- rename the value element -->
<bindings node="//xs:element[@name='EndpointReference']">
<property name="EndpointReference1"/>
</bindings>
</bindings>
but this doesn't seem to work.
How to rename the twice declared element? Otherwise, is there a way to remap the other XSD?