5
是否可以直接從瀏覽器向服務提供者發送SOAP請求?然後解析JavaScript中的輸出以顯示結果?如何從瀏覽器發佈SOAP請求?
舉例來說,如果我有一個SOAP請求like this:
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
那我可以得到「IBM股票價格」通過點擊網頁上的鏈接?並在xml處理後顯示結果。
這裏大概回答:HTTP ://stackoverflow.com/questions/124269/simplest-soap-example-using-javascript – 2010-05-21 23:09:29