我曾尝试使用两个版本的轴创建客户端,我甚至尝试过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 ???
创建客户端答案 0 :(得分:0)
我找到了问题的解决方案,我使用CXF来解决这个问题, 我将wsdl编辑为rpc,将绑定样式更改为rpc而不是document。
谢谢