Java Reference
In-Depth Information
Chapter 8. Adding Web Services to
Your Applications
In the earlier chapter, we discussed the Java Messaging Service API that is commonly
used to develop loosely coupled applications and also to develop a common integra-
tion pattern for Java-to-Java systems. In this chapter, we will learn about web services
that are defined by W3C as software systems, and are designed to support interoper-
able machine-to-machine interaction over a network.
What makes web services different from other forms of distributed computing is that
information is exchanged using only simple and nonproprietary protocols. This means
the services can communicate with each other regardless of location, platform, or pro-
gramming language. Essentially, web services protocols provide a platform-independ-
ent way to perform Remote Procedure Calls ( RPCs ).
The focus of this chapter will be on the two chief web services standards, JAX-WS
(JSR 224) and JAX-RS (JSR 311), and how they are implemented into JBoss AS 7.
As you can imagine, there is a lot of ground to cover, so we will quickly get our hands
dirty with the following topics:
• A short introduction to SOAP web services
• Creating, deploying, and testing web services using the JBoss JAX-WS
implementation (Apache CXF)
• A quick overview of REST web services
• How to create, deploy, and test RESTful services using the JBoss JAX-RS
implementation (RESTEasy)
Developing SOAP-based web services
As stated, web services are based on the exchange of messages using nonpropri-
etary protocol messages. The messages themselves are not sufficient to define the
web service platform. We actually need a list of standard components, including the
following:
Search WWH ::




Custom Search