尝试wsimport用于为SOAP端点生成客户端.WSDL和使用的所有XSD文件都是本地副本.
这是正在执行的命令:
wsimport ./bwWsdl.xml -p com.generated -Xnocompile -d ../src -extension -keep -XadditionalHeaders -B-XautoNameResolution
Run Code Online (Sandbox Code Playgroud)
这给出了这个错误:
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 16 of file:/schemas/newSchema.xsd
[ERROR] (Related to above error) This is the other declaration.
line 16 of file:/schemas/newSchema.xsd
Run Code Online (Sandbox Code Playgroud)
请注意,报告的碰撞的行号是相同的.
这是架构:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
version="2.004" id="OTA2003A2009A">
<xs:complexType name="TPA_ExtensionsType">
<xs:annotation>
<xs:documentation xml:lang="en">Description here.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:element name="TPA_Extensions" type="TPA_ExtensionsType">
<xs:annotation>
<xs:documentation xml:lang="en">More description here.</xs:documentation>
</xs:annotation>
</xs:element> …Run Code Online (Sandbox Code Playgroud)