关于WebService的问题,都进来看看吧,不知道你们遇到过没有! 头都被它整大啦。
现在有这么一个WebService的地址:http://xxx.xxx.xxx.xxx:8080/OrderServerWS?wsdl
它里面提供了这么一个方法:PosMessage transact(PosMessage msg)
因为WebService里面方法参数是一个对象,那么我应该怎么调用?我没有此WebService对应的接口噢!
想了大半天,试了许多方法,都没有成功,不知道有大神知道不。
WebService的WSDL文件如下:
<?xml version="1.0" encoding="UTF-8"?><definitions name="OrderServerWS" targetNamespace="http://thirdpart.service.dnapay/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://thirdpart.service.dnapay/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <xsd:schema> <xsd:import namespace="http://thirdpart.service.dnapay/" schemaLocation="OrderServerWS_schema1.xsd"/> </xsd:schema> </types> <message name="transactResponse"> <part name="return" type="tns:posMessage"> </part> </message> <message name="transact"> <part name="arg0" type="tns:posMessage"> </part> </message> <portType name="IOrderServerWS"> <operation name="transact" parameterOrder="arg0"> <input message="tns:transact"> </input> <output message="tns:transactResponse"> </output> </operation> </portType> <binding name="OrderServerWSPortBinding" type="tns:IOrderServerWS"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="transact"> <soap:operation soapAction=""/> <input> <soap:body use="literal" namespace="http://thirdpart.service.dnapay/"/> </input> <output> <soap:body use="literal" namespace="http://thirdpart.service.dnapay/"/> </output> </operation> </binding> <service name="OrderServerWS"> <port name="OrderServerWSPort" binding="tns:OrderServerWSPortBinding"> <soap:address location="http://xxx.xxx.xxx.xxx:8080/OrderServerWS"/> </port> </service></definitions>