我正在处理一个远程 WSDL,其中一些 XSD 被调用了两次。我正在尝试使用 xjb 绑定来摆脱
'EndpointReference' 已经定义
riga 22 di 文件:...../wsdl/ws-addr.xsd(与上述错误有关)第一个定义出现在这里 riga 22 di 文件:...../wsdl/www.w3.org/2006/03/addressing/ws-addr.xsd
这是 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>
这是 jxb 绑定
<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>
但这似乎不起作用。
如何重命名两次声明的元素?否则,有没有办法重新映射其他 XSD?