J
jadic
Unregistered / Unconfirmed
GUEST, unregistred user!
web service 服务端是用cxf简单实现的,java作为客户度已经能成功调用但用Delphi作为客户端调用时出错Delphi实现客户端时,直接用Delphi自带的wsdl importor生成接口文件先把wsdl贴出来吧<?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions name="HelloWorldImplService" targetNamespace="http://server.cxf.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://server.cxf.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">- <wsdl:types>- <xs:schema elementFormDefault="unqualified" targetNamespace="http://server.cxf.com/" version="1.0" xmlns:tns="http://server.cxf.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="sayHi" type="tns:sayHi" /> <xs:element name="sayHiResponse" type="tns:sayHiResponse" /> - <xs:complexType name="sayHi">- <xs:sequence> <xs:element minOccurs="0" name="text" type="xs:string" /> </xs:sequence> </xs:complexType>- <xs:complexType name="sayHiResponse">- <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:schema> </wsdl:types>- <wsdl:message name="sayHiResponse"> <wsdlart element="tns:sayHiResponse" name="parameters" /> </wsdl:message>- <wsdl:message name="sayHi"> <wsdlart element="tns:sayHi" name="parameters" /> </wsdl:message>- <wsdlortType name="HelloWorld">- <wsdlperation name="sayHi"> <wsdl:input message="tns:sayHi" name="sayHi" /> <wsdlutput message="tns:sayHiResponse" name="sayHiResponse" /> </wsdlperation> </wsdlortType>- <wsdl:binding name="HelloWorldImplServiceSoapBinding" type="tns:HelloWorld"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdlperation name="sayHi"> <soapperation soapAction="" style="document" /> - <wsdl:input name="sayHi"> <soap:body use="literal" /> </wsdl:input>- <wsdlutput name="sayHiResponse"> <soap:body use="literal" /> </wsdlutput> </wsdlperation> </wsdl:binding>- <wsdl:service name="HelloWorldImplService">- <wsdlort binding="tns:HelloWorldImplServiceSoapBinding" name="HelloWorldImplPort"> <soap:address location="http://192.168.3.19:9199/helloWorld" /> </wsdlort> </wsdl:service> </wsdl:definitions>