<?xml version="1.0"?>
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl"
xmlns:tns="http://example.com/stockquote.wsdl"
xmlns:xsd1="http://example.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<!-- 独立与机器和语言的类型定义 -->
<types>
<schema targetNamespace="http://example.com/stockquote.xsd"
xmlns="http://www.w3.org/2000/10/XMLSchema">
<element name="TradePriceRequest">
<complexType>
<all>
<element name="tickerSymbol" type="string" />
</all>
</complexType>
</element>
<element name="TradePrice">
<complexType>
<all>
<element name="price" type="float" />
</all>
</complexType>
</element>
</schema>
</types>
<!-- 包括函数参数(输入与输出分开)或文档描述 -->
<message name="GetLastTradePriceInput">
<part name="body" element="xsd1:TradePriceRequest" />
</message>
<message name="GetLastTradePriceOutput">
<part name="body" element="xsd1:TradePrice" />
</message>
<!-- 引用消息部分中消息定义来描述函数签名(操作名、输入参数、输出参数) -->
<portType name="StockQuotePortType">
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceInput" />
<output message="tns:GetLastTradePriceOutput" />
</operation>
</portType>
<!-- PortTypes部分的每一操作在此绑定实现 -->
<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<!-- 说明了消息样式是rpc(document),并且网络应用协议是HTTP -->
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<!-- -->
<operation name="GetLastTradePrice">
<soap:operation
soapAction="http://example.com/GetLastTradePrice" />
<input>
<!-- 说明输入输出元素均使用了字面编码。use的值必须是literal -->
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<!-- 确定每一绑定的端口地址 -->
<service name="StockQuoteService">
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
<soap:address location="http://example.com/stockquote" />
</port>
</service>
</definitions>