Choosing between SOAP and REST services

The choice of adopting SOAP rather than REST depends on your application's requirements. SOAP web services are exposed using their own well-defined protocol and focus on exposing pieces of application logic as services. So if your requirement is to consume business services that are exposed using a well-defined and negotiated contract (between the service consumer and service provider), SOAP web services are a perfect match.

On the other hand, if you need to access some server resources using stateless HTTP invocations and as little as possible of the navigation bar of your browser, you should probably go with RESTful web services.

That being said, there may still be some scenarios that could fit both the ...

Get Java EE 7 Development with WildFly now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.