xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XML
Schema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin
g/" xmlns:NS2="http://microsoft.com/wsdl/types/">
<NS1:GetServiceInfo xmlns:NS1="http://goldentek.biz/">
<passport xsi:type="xsd:string">xxx@im.chinabubble.compassport>
<oem xsi:type="NS2:guid">{xxxxxxxx-8456-550a-8bb9-65d484f8bc3b}oem>
<codePage xsi:type="xsd:int">936codePage>
NS1:GetServiceInfo>
SOAP-ENV:Body>
SOAP-ENV:Envelope>
<NS1:GetServiceInfo xmlns:NS1="http://goldentek.biz/">
<passport xsi:type="xsd:string">monkeyking@im.chinabubble.compassport>
<oem xsi:type="NS2:guid">{341a4fbb-8456-550a-8bb9-65d484f8bc3b}oem>
<codePage xsi:type="xsd:int">936codePage>
NS1:GetServiceInfo>
xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xm
lns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XML
Schema-instance">
<SOAP-ENV:Body>
<GetServiceInfo xmlns="http://goldentek.biz/">
<passport>xxxxx@im.chinabubble.compassport>
<oem>{xxxxxxxx-8456-550a-8bb9-65d484f8bc3b}oem>
<codePage>936codePage>
GetServiceInfo>
SOAP-ENV:Body>
SOAP-ENV:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:GetServiceInfo xmlns:m="http://goldentek.biz/">
<m:passport>monkeyking@im.chinabubble.comm:passport>
<m:oem>341a4fbb-8456-550a-8bb9-65d484f8bc3bm:oem>
<m:codePage>936m:codePage>
m:GetServiceInfo>
SOAP-ENV:Body>
SOAP-ENV:Envelope>wsdl规范:
http://www.w3.org/TR/2004/WD-wsdl20-primer-20041221/
下面是1.1和2.0的wsdl,webmethod是:
[WebMethod]
public string HelloWorld(string s) {
string t = s;
return "Hello World";
}
.net1.1生成的wsdl:
xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="HelloWorld">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s" type="s:string" />
s:sequence>
s:complexType>
s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
s:sequence>
s:complexType>
s:element>
s:schema>
wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
wsdl:message>
- <wsdl:portType name="Service1Soap">
- <wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
wsdl:operation>
wsdl:portType>
- <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
+ <wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
<soap:body use="literal" />
wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
wsdl:output>
wsdl:operation>
wsdl:binding>
- <wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
- <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address location="http://localhost/WebService1/Service1.asmx" />
wsdl:port>
wsdl:service>
wsdl:definitions>
.net2.0生成的wsdl:
xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="HelloWorld">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="s" type="s:string" />
s:sequence>
s:complexType>
s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
s:sequence>
s:complexType>
s:element>
s:schema>
wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
wsdl:message>
- <wsdl:portType name="ServiceSoap">
- <wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
wsdl:operation>
wsdl:portType>
- <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
<soap:body use="literal" />
wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
wsdl:output>
wsdl:operation>
wsdl:binding>
- <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
wsdl:output>
wsdl:operation>
wsdl:binding>
- <wsdl:service name="Service">
- <wsdl:port
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12639172/viewspace-332350/ ,如需转载,请注明出处,否则将追究法律责任。