In this chapter, we introduced some of the basic web services concepts so that you could
get acquainted with these technologies before using them to enhance your ticket applica-
Then, we went through SOAP-based web services that are based on a contract between the
service and client defined by the WSDL file. SOAP web services are an excellent option to
integrate systems when you have well-defined, abstract operations exposed using standard
Then, we discussed REST services. The key to the REST methodology is to write web ser-
vices using an interface that is already well known and widely used: the URI. The twist
here is to identify the key system resources (this can be entities, collections, or anything
else the designer thinks is worthy of having its own URI) and expose them using standard
methods that are mapped to standard methods. In this case, the HTTP verbs are mapped to
We created two applications that use our REST API: one console-based and one written
second one knows only about JSON; it has no idea about the Java classes underneath (or
even about Java).
We discussed application server resources a lot. In the next chapter, we will explore another
approach for client-server communication: WebSockets.