简体   繁体   English

我们的应用程序中可以同时包含RESTful和SOAP Web服务吗

[英]Can we have both RESTful and SOAP Web Services in our application

We have been using SOAP based web services in our J2EE application. 我们一直在J2EE应用程序中使用基于SOAP的Web服务。 Now there is a requirement of having client for RESTful web services. 现在,需要具有RESTful Web服务的客户端。 If we are going to have client for RESTful, is there any problem? 如果我们要有RESTful的客户端,有什么问题吗? Does it mean that not consistent Architecture? 这是否意味着体系结构不一致?

SOAP is a message protocol, REST is a design/architectural philosophy. SOAP是消息协议,REST是设计/体系结构哲学。 In what means are you trying to compare and contrast them? 您要以什么方式比较它们? Web Services that communicate via SOAP can be RESTful, or not, depending on the design. 根据设计,通过SOAP进行通信的Web服务是否可以是RESTful。

If by RESTful you mean "Management wants the URLs to look like http://example.com/shoppingcart/123/addItem/456 " then it really shouldn't be a big deal with any half decent framework to have both types of requests end up at the same service method with minimal work to route them. 如果说RESTful的意思是“管理部门希望URL看起来像http://example.com/shoppingcart/123/addItem/456 ”,那么对于拥有两种类型的请求的任何像样的框架来说,这都不是什么大不了的事情只需很少的工作就可以采用相同的服务方法进行路由。 Having the magic "RESTy looking URLs" doesn't make your service inherently any more or less RESTful. 拥有神奇的“ RESTy外观URL”并不能使您的服务本质上或多或少具有REST风格。 Lots of services with the "REST look" are highly coupled to a stateful server side. 许多具有“ REST外观”的服务都与有状态服务器端高度耦合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM