0

我尝试使用轴两个版本创建客户端,我什至尝试了 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 创建客户端???

4

1 回答 1

0

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

谢谢

于 2013-10-03T13:49:36.840 回答