XML-RPC 和 SOAP 有什么区别?

发布于 2024-07-05 13:39:43 字数 81 浏览 7 评论 0原文

我从来没有真正理解为什么 Web 服务实施者会选择其中之一。 XML-RPC 通常出现在较旧的系统中吗? 任何有助于理解这一点的帮助将不胜感激。

I've never really understand why a web service implementer would choose one over the other. Is XML-RPC generally found in older systems? Any help in understanding this would be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

为人所爱 2024-07-12 13:39:43

为了补充其他答案,我鼓励您查看 SOAP 和 XML-RPC 调用的实际文本表示,也许可以通过使用 Ethereal 捕获一个来表示。 整个“XML-RPC 更简单”的论点没有多大意义,除非您看到 SOAP 调用是多么冗长。 许多相当流行的网站都回避使用 SOAP 作为其 API,因为如果人们开始广泛使用它,它会消耗大量的带宽。

Just to add to the other answers, I would encourage you to look at actual textual representations of SOAP and XML-RPC calls, perhaps by capturing one with Ethereal. The whole, "XML-RPC is simpler" argument doesn't make much sense until you see how incredibly verbose a SOAP call is. Many of the fairly popular web sites out there shy away from SOAP as their API due to just the amount of bandwidth it would consume if people started using it extensively.

很酷又爱笑 2024-07-12 13:39:43

差异?

SOAP 更强大,并且更受软件工具供应商(MSFT .NET、Java 企业版等)的青睐。

SOAP 很长一段时间(2001-2007 年左右)被视为 SOA 的首选协议。 xml-rpc 没有那么多。 REST 是 SOA 的新宠儿,尽管它不是一个协议。

SOAP 更冗长,但功能更强大。

一些旧的东西不支持 SOAP。 例如,没有经典 ASP 的 SOAP 库(我可以找到)。

Python 中并没有很好地支持 SOAP。 XML-RPC 在 python 和标准库中得到了很好的支持。

SOAP 支持文档级传输,而 xml-rpc 更多的是关于值传输,尽管它可以传输结构、列表等结构。xm

-rpc 实际上是关于程序到程序语言无关的传输。 它主要通过 http/https。 SOAP 消息也可以通过电子邮件传递。

xml-rpc 更加unixy。 它让您可以简单地做事,当您知道自己在做什么时,即使使用终端文本编辑器,也可以非常快速地部署高质量的 Web 服务。 那样做 SOAP 就如同动物园; 你确实需要一个好的 IDE 来使其可行。

不过,如果您正在争夺财富 500 强的 IT 工作,了解 SOAP 会让您的简历看起来更漂亮。

xml-rpc 对于非 ASCII 字符集存在一些问题。

XML-RPC 不支持命名参数。 它们的顺序必须正确。 不确定 SOAP,但这么认为。

Differences?

SOAP is more powerful, and is much preferred by software tool vendors (MSFT .NET, Java Enterprise edition, that sort of things).

SOAP was for a long time (2001-2007ish) seen as the protocol of choice for SOA. xml-rpc not so much. REST is the new SOA darling, although it's not a protocol.

SOAP is more verbose, but more capable.

SOAP is not supported in some of the older stuff. For example, no SOAP libs for classic ASP (that I could find).

SOAP is not well supported in python. XML-RPC has great support in python, in the standard library.

SOAP supports document-level transfer, whereas xml-rpc is more about values transfer, although it can transfer structures such as structs, lists, etc.

xm-rpc is really about program to program language agnostic transfer. It primarily goes over http/https. SOAP messages can go over email as well.

xml-rpc is more unixy. It lets you do things simply, and when you know what you're doing, it's very fast to deploy quality web services, even when using terminal text editors. Doing SOAP that way is a zoo; you really need a good IDE to make it feasible.

Knowing SOAP, though, will look much better on your resume/CV if you're vying for a Fortune 500 IT job.

xml-rpc has some issues with non-ascii character sets.

XML-RPC does not support named parameters. They must be in correct order. Not sure about SOAP, but think so.

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