SOAP和RESTful Web服务在java中的主要区别(Main differences between SOAP and RESTful web services in java [duplic

编程入门 行业动态 更新时间:2024-10-24 14:15:23
SOAP和RESTful Web服务在java中的主要区别(Main differences between SOAP and RESTful web services in java [duplicate])

跟进这个帖子的问题:

现在我对SOAP和RESTful服务之间的差异有一点点了解。

我的问题是当我应该使用SOAP,当我应该使用RESTful; 在性能/速度或请求处理方面哪一个更好?

我在RESTful(java)中第一次实现,我想知道更多关于它; 之前我已经处理了SOAP。

This question already has an answer here:

SOAP vs REST (differences) 10 answers

Follow up question to this post:

For now I have a slight idea about the differences between SOAP and RESTful Services.

My question is when I should use SOAP, and when I should use RESTful; which one is "better" when it comes to performance/speed or request handling?

I'm implementing for the first time in RESTful(java) and I want know more about it; I've dealt with SOAP before.

最满意答案

REST几乎总是会更快。 SOAP的主要优点在于它提供了一种服务对客户端自身描述的机制,并且宣传其存在。

REST更轻巧,可以使用几乎任何工具实现,从而降低带宽,缩短学习曲线。 但是,客户必须知道要发送什么以及期待什么。

一般来说,当您向外部世界发布一个复杂或可能发生变化的API时,SOAP将更加有用。 除此之外,REST通常是更好的选择。

REST is almost always going to be faster. The main advantage of SOAP is that it provides a mechanism for services to describe themselves to clients, and to advertise their existence.

REST is much more lightweight and can be implemented using almost any tool, leading to lower bandwidth and shorter learning curve. However, the clients have to know what to send and what to expect.

In general, When you're publishing an API to the outside world that is either complex or likely to change, SOAP will be more useful. Other than that, REST is usually the better option.

更多推荐

本文发布于:2023-08-06 19:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1454962.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:区别   Web   java   SOAP   RESTful

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!