DCOM 和CORBA/IIOP都依靠于周密治理的環境。兩個任意的計算機使得DCOM或IIOP 在環境之外被成功調用(calls out of the box)的幾率是很低的。非凡是在考慮安全性的時候尤其是這樣。盡管寫一個能成功地運用DCOM或IIOP的緊縮包(shrink-wrap)應用是可能的,但這樣做要比基于socket的應用要更多地關注細節。這對于乏味但必需的配置和安裝治理任務非凡適用。
<reverse_string xmlns="urn:schemas-develop-com:StringProcs"> <string1>Hello, World</string1> <comment xmlns=‘http://foo.com/documentation‘> This is a comment!! </comment> </reverse_string>
<sp:reverse_string xmlns:sp="urn:schemas-develop-com:StringProcs" xmlns:doc=‘http://foo.com/documentation‘ > <sp:string1>Hello, World</sp:string1> <doc:comment> This is a comment!! </doc:comment> </sp:reverse_string>
Dim bank as IBank Dim amount as Single Dim newBal as Single Dim overdrawn as Boolean amount = 100 Set bank = GetObject("soap:http://bofsoap.com/am") overdrawn = bank.withdraw(3512, amount, newBal)
當通過SOAP調用方法時,請求對象和響應對象被序列化成一種已知的格式。每個SOAP體是一個XML文檔,它具有一個顯著的稱為<Envelope>的根元素。標記名<Envelope>由SOAP URI (urn:schemas-xmlsoap-org:soap.v1)來劃定范圍,所有SOAP專用的元素和屬性都是由這個URI來劃定范圍的。SOAP Envelope包含一個可選的<Header>元素,緊跟一個必須的<Body>元素。<Body>元素也有一個顯著的根元素,它或者是一個請求對象或者是一個響應對象。下面是一個IBank::withdraw請求的編碼: