通过 WSDL 形成 SOAP 请求消息
我对网络服务很陌生。我试图弄清楚如何根据我拥有的 wsdl 描述来制定请求消息(并确定响应消息)。
这是来自第三方网络服务。我有权访问的 WSDL 描述为我提供了一堆信息,例如
等。
但在我在网上看到的示例中,它在“soap:envelope”标签内显示请求消息。
我缺少什么?
最终我希望能够使用 JQuery 调用这个 Web 服务。但我什至不知道如何制定请求消息,更不用说对其进行 ajax 调用了。
任何帮助将不胜感激。
I'm very new to webservices. I'm trying to figure out how I can formulate a request message (and determine what the response message) would be based on the wsdl description that I have.
This is from a third party web service. The WSDL description that I have access to gives me a bunch of information like <types>
<message>
<operation>
etc.
But in the examples that I've seen online, it's showing the request mesage within the "soap:envelope" tag.
What am I missing?
Eventually I'd like to be able to call this webservice using JQuery. But I can't even figure out how to formulate the request message let alone make an ajax call to it.
any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于这些类型的情况,我会下载 soapUI,将其指向您的 WSDL 并使用它生成一些示例请求熟悉服务的端点、消息和数据模型 (XSD)。
有了soapUI的示例请求,应该很容易将其移动到jQuery的SOAP客户端(假设原因该服务并不庞大,并且需要您将大对象图传输为 XML - 在这些情况下,您可能需要检查您的服务供应商是否有 REST API,因为这些 API 通常很容易通过 jQuery 使用。
For these types of situations I would download soapUI, point it to your WSDL and use it to generate a few sample requests to get familiar with the endpoints, messages and the data model (XSD) for the service.
Armed with soapUI's sample requests it should be fairly easy to move this to jQuery's SOAP client (assuming of cause that the service is not humongous and requires you to transfer a big object graph as XML - in these cases you might want to check if your service vendor has a REST API as these are generally very easy to work with from jQuery).