如何从浏览器发布 SOAP 请求? [英] How to post a SOAP request from a browser?
本文介绍了如何从浏览器发布 SOAP 请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以直接从浏览器向服务提供商发送 SOAP 请求?然后在javascript中解析输出以显示结果?
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?
例如,如果我有一个 SOAP 请求 像这样 :
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>
然后我可以通过单击网页上的链接来获取IBM 股票价格"吗?并显示xml处理后的结果.
Then can I get the 'IBM stock price' by clicking on a link on a web page? And show result after xml processing.
推荐答案
听起来您正在寻找的是 JavaScript SOAP 库.
It sounds like what you're looking for is a JavaScript SOAP library.
我对其中任何一个都没有太多经验,但是 Google 快速搜索出现了
I don't have a lot of experience with any of them, but a quick Google search turned up
- http://www.codeproject.com/kb/Ajax/JavaScriptSOAPClient.aspx
- http://javascriptsoapclient.codeplex.com/
- http://plugins.jquery.com/project/jqSOAPClient
这篇关于如何从浏览器发布 SOAP 请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文