通过 WSDL 形成 SOAP 请求消息

发布于 2024-10-09 20:04:50 字数 360 浏览 0 评论 0原文

我对网络服务很陌生。我试图弄清楚如何根据我拥有的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见 2024-10-16 20:04:50

对于这些类型的情况,我会下载 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文