【发布时间】:2017-07-14 12:16:16
【问题描述】:
我从 stackoverflow 中查看了类似的解决方案,但我无法处理。
它说:[错误] 属性“任何”已经定义。使用
WSDL:
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri_integration.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri_integration.org/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri_integration.org/">
.
.
.
<s:element name="Get_DataSet_Data_With_IDResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Get_DataSet_Data_With_IDResult">
<s:complexType>
<s:sequence>
<s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax"/>
<s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element minOccurs="0" maxOccurs="1" name="pref_err" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
</wsdl:definitions>
绑定xml:
<jxb:bindings xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://java.sun.com/xml/ns/jaxws"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:s="http://www.w3.org/2001/XMLSchema"
wsdlLocation="http://10.10.10.10:8080/integration.asmx?wsdl">
<jxb:bindings
node="/wsdl:definitions/wsdl:types/s:schema/s:element[@name='Get_DataSet_Data_With_IDResponse']/s:complexType/s:sequence/s:element[@name='Get_DataSet_Data_With_IDResult']/s:complexType/s:sequence/s:any[@namespace='urn:schemas-microsoft-com:xml-diffgram-v1']/s:complexType">
<jxb:property name="any2"/>
</jxb:bindings>
</jxb:bindings>
还有这样的cmd命令:
wsimport -clientjar export.jar -b binding.xml http://10.10.10.10:8080/integration.asmx?wsdl
【问题讨论】:
标签: java xml jaxb wsdl wsimport