Web services are a very useful technology for enterprise application integration. They allow disparate systems to communicate with each other. Web service APIs are typically self-contained and lightweight.
There are broadly two types of web services: SOAP-based and RESTful. SOAP-based web services are XML-based and provide many features such as security, attachments, and transactions. RESTful web services can exchange data by using XML or JSON. RESTful JSON web services are quite popular because they can be easily consumed from JavaScript code.
In this chapter, we learned how to develop and consume RESTful and SOAP-based web services by using the latest Java specifications, JAX-RS and JAX-WS.
In the next chapter, we will take a look at another technology for application integration: asynchronous programming using Java Messaging Service (JMS).