简体   繁体   中英

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 not 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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