基于Web的電子商務(wù)解決方案(3)_Windows教程
<?xml version="1.0" encoding="utf-8"?>
<S:Envelope xmlns:S="http://www.w3.org/2001/12/soap-envelope"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<S:Header>
<m:path xmlns:m="http://schemas.xmlsoap.org/rp/">
<m:action>http://fabrikam123.com/getQuote</m:action>
<m:to>http://fabrikam123.com/stocks</m:to>
<m:id>uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6</m:id>
</m:path>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
<wsse:UsernameToken Id="MyID">
<wsse:Username>Zoe</wsse:Username>
</wsse:UsernameToken>
<ds:Signature>
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm=
"http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod
Algorithm=
"http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
<ds:Reference URI="#MsgBody">
<ds:DigestMethod
Algorithm=
"http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>LyLsF0Pi4wPU...</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>DJbchm5gK...</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference URI="#MyID"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</S:Header>
<S:Body Id="MsgBody">
<tru:StockSymbol xmlns:tru="http://fabrikam123.com/payloads">
QQQ
</tru:StockSymbol>
</S:Body>
</S:Envelope>
其中標(biāo)記<wsse:UsernameToken > 與</wsse:UsernameToken > 間的部分為用戶令牌,標(biāo)記<ds:Signature>與</ds:Signature>間的部分為數(shù)字簽名。
四、系統(tǒng)性能分析
基于統(tǒng)一安全服務(wù)的Web service 電子商務(wù)解決方案由以下優(yōu)點(diǎn):
1.由于關(guān)于安全方面的處理機(jī)制全部集中在統(tǒng)一服務(wù)層,電子商務(wù)系統(tǒng)中的其它實(shí)體就沒有必要單獨(dú)實(shí)現(xiàn)所有的安全功能和機(jī)制。因此整個(gè)系統(tǒng)安全策略的制定、實(shí)施與維護(hù)變得很簡單。
2.SOAP對于統(tǒng)一安全服務(wù)的接口使Web Service統(tǒng)一安全服務(wù)體系結(jié)構(gòu)變得非常通用。統(tǒng)一安全服務(wù)本身也是一個(gè)Web service,使得系統(tǒng)中的其它部分可以很方便的將統(tǒng)一安全服務(wù)集成到一起。
3.由于不必到處傳遞安全信用信息,統(tǒng)一安全服務(wù)增強(qiáng)了整個(gè)系統(tǒng)的安全性。統(tǒng)一安全服務(wù)層成為唯一可以接受安全信用信息的場所,所以就可以在一個(gè)廣闊的范圍里進(jìn)行鑒別(超出特定的安全域),而安全信用信息卻仍然位于特定的安全域中。
小知識:Web service平臺是一套標(biāo)準(zhǔn),它定義了應(yīng)用程序如何在Web上實(shí)現(xiàn)互操作性�?梢杂萌魏文阆矚g的語言,不同的平臺中編寫Web service ,而通過Web service的標(biāo)準(zhǔn)來對這些服務(wù)進(jìn)行查詢和訪問。| 小知識:Web service平臺是一套標(biāo)準(zhǔn),它定義了應(yīng)用程序如何在Web上實(shí)現(xiàn)互操作性�?梢杂萌魏文阆矚g的語言,不同的平臺中編寫Web service ,而通過Web service的標(biāo)準(zhǔn)來對這些服務(wù)進(jìn)行查詢和訪問。 |
- 相關(guān)鏈接:
- 教程說明:
Windows教程-基于Web的電子商務(wù)解決方案(3)
。