2010-05-21 7 views
5

Est-il possible d'envoyer une demande SOAP directement d'un navigateur au fournisseur de services? Et puis analyser la sortie en JavaScript pour afficher le résultat?Comment publier une requête SOAP à partir d'un navigateur?

Par exemple, si j'ai une demande 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> 

alors obtenir le « prix des actions IBM » en cliquant sur un lien sur une page web? Et afficher le résultat après le traitement XML.

+1

probablement répondu: http : //stackoverflow.com/questions/124269/simplest-soap-example-using-javascript –

Répondre