【问题标题】:Use a class customization to resolve this conflict in java WSIMPORT使用类自定义来解决 java WSIMPORT 中的这种冲突
【发布时间】:2019-07-05 06:25:36
【问题描述】:

我有一个如下所示的 wsdl:

<xs:element name="getlocationlist">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="auth" type="tns:AuthDTO"/>
<xs:element minOccurs="0" maxOccurs="1" name="getlocationlist" 
type="tns:getlocationlist"/>
</xs:sequence>
 </xs:complexType>
 </xs:element>
<xs:complexType name="getlocationlist">
 <xs:sequence>
 <xs:element minOccurs="0" maxOccurs="1" name="ExtensionData" 
  type="tns:ExtensionDataObject"/>
 </xs:sequence>
</xs:complexType>
<xs:element name="getlocationlistResponse">
<xs:complexType>
 <xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="getlocationlistResult">
<xs:complexType>
<xs:sequence>
 <xs:any/>
 </xs:sequence>
 </xs:complexType>
 </xs:element>
 </xs:sequence>
 </xs:complexType>
 </xs:element>

如您所见,有一些重复的元素“getlocationlist”,wsimport 无法生成存根并建议使用类自定义。有没有人知道如何使用类自定义或额外的绑定来处理它。感谢和感谢andvance。如果您需要更多信息,请询问。

【问题讨论】:

    标签: soap wsdl2java wsimport


    【解决方案1】:

    我解决了这个问题。这是我的解决方案:

    1. http://cxf.apache.org/download.html下载apache cxf二进制文件
    2. 提取它并将其添加到您的路径中。在 MAC 中,更新您的 bash_profile
    3. 运行以下命令:

    wsdl2java -client -p your_package_name -autoNameResolution https://gateway.abc.com/something.svc?wsdl

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 1970-01-01
      • 1970-01-01
      • 2014-09-17
      • 1970-01-01
      • 2013-11-10
      • 1970-01-01
      相关资源
      最近更新 更多