七、附录
WSDL文件样例
<?xml version="1.0" encoding="UTF-8" ?> <wsdl:definitions targetNamespace="http://localhost:8090/webserviceTest/services/wstest" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8090/webserviceTest/services/wstest" xmlns:intf="http://localhost:8090/webserviceTest/services/wstest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema targetNamespace="http://localhost:8090/webserviceTest/services/wstest" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <complexType name="WsBean"> <sequence> <element name="name" nillable="true" type="xsd:string" /> <element name="age" type="xsd:int" /> </sequence> </complexType> </schema> </wsdl:types> <wsdl:message name="getWsBeanResponse"> <wsdl:part name="getWsBeanReturn" type="impl:WsBean" /> </wsdl:message> <wsdl:message name="getWsBeanRequest"> <wsdl:part name="name" type="xsd:string" /> <wsdl:part name="age" type="xsd:int" /> </wsdl:message> <wsdl:message name="getNameResponse"> <wsdl:part name="getNameReturn" type="xsd:string" /> </wsdl:message> <wsdl:message name="getNameRequest" /> <wsdl:portType name="WsTest"> <wsdl:operation name="getName"> <wsdl:input message="impl:getNameRequest" name="getNameRequest" /> <wsdl:output message="impl:getNameResponse" name="getNameResponse" /> </wsdl:operation> <wsdl:operation name="getWsBean" parameterOrder="name age"> <wsdl:input message="impl:getWsBeanRequest" name="getWsBeanRequest" /> <wsdl:output message="impl:getWsBeanResponse" name="getWsBeanResponse" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="wstestSoapBinding" type="impl:WsTest"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="getName"> <wsdlsoap:operation soapAction="" /> <wsdl:input name="getNameRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.ufgov.com" use="encoded" /> </wsdl:input> <wsdl:output name="getNameResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8090/webserviceTest/services/wstest" use="encoded" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="getWsBean"> <wsdlsoap:operation soapAction="" /> <wsdl:input name="getWsBeanRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://webservice.ufgov.com" use="encoded" /> </wsdl:input> <wsdl:output name="getWsBeanResponse"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8090/webserviceTest/services/wstest" use="encoded" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="WsTestService"> <wsdl:port binding="impl:wstestSoapBinding" name="wstest"> <wsdlsoap:address location="http://localhost:8090/webserviceTest/services/wstest" /> </wsdl:port> </wsdl:service></wsdl:definitions>
??
(完)