【问题标题】:Can't create client for SOAP 1.1 using axis 1 or axis 2无法使用轴 1 或轴 2 为 SOAP 1.1 创建客户端
【发布时间】:2013-10-02 09:38:23
【问题描述】:

我尝试使用轴两个版本创建客户端,我什至尝试了 ws-import 但注意到它正在工作。

你可以在这里找到 WSDL

轴 2 的问题

  <wsdl:message name="getReservationbyPNRRequest">
    <wsdl:part name="OTA_ReadRQ" element="tns:OTA_ReadRQ"/>
    <wsdl:part name="AAReadRQExt" element="ns1:AAReadRQExt"/>
  </wsdl:message>

它抱怨这条消息有两个部分,我试图将样式设置为 rpc。

org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: The binding operation getAvailability is RPC/literal. The message parts for this operation must use the type attribute as specificed by WS-I Basic Profile specification (4.4.1).  Message part, OTA_AirAvailRQ, violatesthis rule.  Please remove the element attribute and use the type attribute.
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addPartToElement(WSDL11ToAxisServiceBuilder.java:2066)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getNewComplextType(WSDL11ToAxisServiceBuilder.java:1931)
    at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1601)

当我使用轴 1 时,它会抱怨

2003\_05\MoneyOrPercentageType.java:28: MoneyOrPercentageType(java.math.BigDecimal) is already defined in org.opentravel.www.OTA._2003._05.MoneyOrPercentageType
    public MoneyOrPercentageType(java.math.BigDecimal _value) {

任何人都可以建议我如何从这个 wsdl 创建客户端吗???

【问题讨论】:

    标签: web-services wsdl axis2 axis wsdl2java


    【解决方案1】:

    我找到了我的问题的解决方案,我使用 CXF 解决了这个问题, 我通过将绑定样式更改为 rpc 而不是文档,将 wsdl 编辑为 rpc。

    谢谢

    【讨论】:

      猜你喜欢
      • 2017-02-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多