开发者

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

We have been using SOAP based web services in our J2EE application. Now there is a requirement of having client for RESTful web services. If we are going to have client for RESTful, is there any problem? Does it mean that n开发者_开发技巧ot consistent Architecture?


SOAP is a message protocol, REST is a design/architectural philosophy. 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.

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. Having the magic "RESTy looking URLs" doesn't make your service inherently any more or less RESTful. Lots of services with the "REST look" are highly coupled to a stateful server side.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜