这让我疯了.我在WSDL中嵌入了需要自定义的模式,因为WSIMPORT引发了以下错误
[ERROR] Complex type and its child element share the same name "DomainsMap".
Use a class customization to resolve this conflict.
line 878 of file:/C:/jaxws-ri/bin/ArtesiaWebServices.wsdl
Run Code Online (Sandbox Code Playgroud)
1)我无法控制这个WSDL,因为我正在构建一个WSDL第一个客户端,并且我希望它能够在没有任何正式咨询或发布给我的情况下进行修订.2)手动修复此命名冲突是不可接受的,因为我需要将存根的构造包含在自动构建链中.
我必须使用外部自定义文件.我似乎无法弄清楚如何让定制工作.
这是违规的WSDL片段:
<wsdl:definitions>
<wsdl:types>
<xs:schema>
.
.
.
<xs:complexType final="extension restriction" name="domainsMap">
<xs:sequence>
<xs:element name="domainsMap">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="key" type="xs:string"/>
<xs:element minOccurs="0" name="value" type="tns:domainValueMap"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
Run Code Online (Sandbox Code Playgroud)
这将是您展示JAXB技能的绝佳机会.任何帮助将不胜感激.
我一直盯着jaxb文档几个小时但仍然没有运气.如果需要,我可以提供整个WSDL.有人可以帮忙吗?