标签:
Webservice有三个基础标准:
1 <?xml version="1.0" encoding="utf-8" ?> 2 <definitions name="CustomerService" 3 targetNamespace="http://soa-in-practice.com/wsdl" 4 xmlns:tns="http://soa-in-practice.com/wsdl" 5 xmlns:xsd1="http://soa-in-practice.com/xsd" 6 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 7 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 8 xmlns="http://schemas.xmlsoap.org/wsdl/"> 9 10 <types> 11 <xsd:schema 12 targetNamespace="http://soa-in-practice.com/xsd" 13 xmlns="http://soa-in-practice.com/xsd"> 14 15 <xsd:element name="getCustomerAddress"> 16 <xsd:complexType> 17 <xsd:sequence> 18 <xsd:element name="customerID" type="xsd:long"/> 19 </xsd:sequence> 20 </xsd:complexType> 21 </xsd:element> 22 23 <xsd:element name="getCustomerAddressResponse" type="Address"/> 24 <xsd:complexType name="Address"> 25 <xsd:sequence> 26 <xsd:element name="street" type="xsd:string"/> 27 <xsd:element name="city" type="xsd:string"/> 28 <xsd:element name="zipCode" type="xsd:string"/> 29 </xsd:sequence> 30 </xsd:complexType> 31 32 </xsd:schema> 33 </types> 34 35 <message name="getCustomerAddressInput"> 36 <part name="params" element="xsd1:getCustomerAddress"/> 37 </message> 38 <message name="getCustomerAddressOutput"> 39 <part name="params" element="xsd1:getCustomerAddressResponse"/> 40 </message> 41 42 <portType name="CustomerInterface" > 43 <operation name="getCustomerAddress"> 44 <input message="tns:getCustomerAddressInput" /> 45 <output message="tns:getCustomerAddressOutput" /> 46 </operation> 47 </portType> 48 49 <binding name="CustomerSOAPBinding" 50 type="tns:CustomerInterface" > 51 <soap:binding style="document" 52 transport="http://schemas.xmlsoap.org/soap/http" /> 53 <operation name="getCustomerAddress"> 54 <soap:operation 55 soapAction="http://soa-in-practice.com/getCustomerAddress" /> 56 <input> 57 <soap:body use="literal" /> 58 </input> 59 <output> 60 <soap:body use="literal" /> 61 </output> 62 </operation> 63 </binding> 64 65 <service name="CustomerService" > 66 <port name="CustomerPort" 67 binding="tns:CustomerSOAPBinding"> 68 <soap:address 69 location="http://soa-in-practice.com/customer11"/> 70 </port> 71 </service> 72 73 </definitions>
标签:
原文地址:http://www.cnblogs.com/waitforever/p/4621359.html