Java中的SOAP和RESTful Web服务之间的主要区别 [英] Main differences between SOAP and RESTful web services in java

查看:84
本文介绍了Java中的SOAP和RESTful Web服务之间的主要区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

跟进问题这篇文章

目前我对SOAP和RESTful Services之间的差异略有了解。

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

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

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?

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

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 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更轻巧,几乎可以使用任何工具实现,从而带来更低的带宽和更短的学习曲线。但是,客户必须知道要发送什么以及期望什么。

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.

一般情况下,当您向外部世界发布复杂或可能的API时要改变,SOAP会更有用。除此之外,REST通常是更好的选择。

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.

这篇关于Java中的SOAP和RESTful Web服务之间的主要区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆