兩個(gè)SOAP封裝例子
作者:佚名 
  這里我們針對(duì)SOAP封裝的內(nèi)容,列舉了兩個(gè)代碼例子。那么通過下面的兩則例子,希望大家能夠得到一些有價(jià)值的參考。
 對(duì)于SOAP協(xié)議的內(nèi)容,我們?cè)谇懊娴奈恼轮幸呀?jīng)講解過了它的基礎(chǔ)內(nèi)容。這里我們主要針對(duì)SOAP封裝進(jìn)行一下案例的分析。那么下邊我們主要舉出了兩個(gè)SOAP封裝的例子,給大家提供一個(gè)參考。
SOAP封裝:請(qǐng)求編碼舉例
SOAP封裝例1
- POST /StockQuote HTTP/1.1
 - Host: www.stockquoteserver.com
 - Content-Type: text/xml; charset="utf-8"
 - Content-Length: nnnn
 - SOAPAction: "Some-URI"
 - <SOAP-ENV:Envelope
 - xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 - SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/>
 - <SOAP-ENV:Header>
 - <t:Transaction
 - xmlns:t="some-URI"
 - SOAP-ENV:mustUnderstand="1">
 - 5
 - </t:Transaction>
 - </SOAP-ENV:Header>
 - <SOAP-ENV:Body>
 - <m:GetLastTradePrice xmlns:m="Some-URI">
 - <symbol>DEF</symbol>
 - </m:GetLastTradePrice>
 - </SOAP-ENV:Body>
 - </SOAP-ENV:Envelope>
 
SOAP封裝例2
- POST /StockQuote HTTP/1.1
 - Host: www.stockquoteserver.com
 - Content-Type: text/xml; charset="utf-8"
 - Content-Length: nnnn
 - SOAPAction: "Some-URI"
 - <SOAP-ENV:Envelope
 - xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 - SOAP-ENV:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"/>
 - <SOAP-ENV:Body>
 - <m:GetLastTradePriceDetailed
 - xmlns:m="Some-URI">
 - <Symbol>DEF</Symbol>
 - <Company>DEF Corp</Company>
 - <Price>34.1</Price>
 - </m:GetLastTradePriceDetailed>
 - </SOAP-ENV:Body>
 - </SOAP-ENV:Envelope>
 
責(zé)任編輯:佟健 
                    來源:
                    hi.baidu.com
 














 
 
 




 
 
 
 