How to post a SOAP request from a browser?

Posted by understack on Stack Overflow See other posts from Stack Overflow or by understack
Published on 2010-05-21T23:07:07Z Indexed on 2010/05/21 23:10 UTC
Read the original article Hit count: 291

Filed under:
|
|

Is it possible to send a SOAP request directly from a browser to service provider? And then parse the output in javascript to show the result?

For example, if I've a SOAP request 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>

Then can I get the 'IBM stock price' by clicking on a link on a web page? And show result after xml processing.

EDIT Can I send the whole envelope as POST data?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about soap