Topics for Course Review
-
SOAP-based web services use XML so that heterogenous
applications can communicate, thus providing interoperability.
-
SOAP messages have a strictly enforced format that requires
at minimum, an <Envelope> and a <Body>. The SOAP specification
requires that the Envelope and Body elements be namespace-
qualified with a URL that identifies the SOAP version in use.
-
Most SOAP services provide a WSDL that gives clients enough
information so that they can send and receive messages through
the service. The WSDL itself is a well-formed XML document
containing <message>, <portType>, <binding>
and <service>
elements.
-
The JAX-WS API gives Java developers an easy-to-use API
for sending and receiving SOAP messages. JAX-WS uses
annotations to make coding simple.
-
The SOAP with Attachments API (SAAJ) provides Java developers
with a low-level, powerful API for working with SOAP messages,
including those with attachments. It provides an alternative
to JAX-WS that gives developers more control at expense of
requiring much more Java coding.
-
The basic principles of the REST architecture include:
-
Assigning unique resource IDs (URLs) to each REST
resource, for example
http://www.univ.edu/rest/students/1678.
-
Providing multiple representations of resources,
for example XML and JSON. This makes it easier to
support diverse clients.
-
Using links to connect resources, sometimes referred to
as HATEOAS (Hypermedia as the Engine of Application
State).
-
Using standard HTTP verbs (methods) such as GET,
POST, PUT and DELETE.
-
Participants communicate statelessly to
provide scalability. This makes techniques such
as remembering a logged-in user more challenging,
it's still feasible using tokens.
-
JSON is a format specification that's based on native
JavaScript syntax. JSON is perhaps the most popular
format used by REST applications. JSON has a simple
syntax that supports defining objects using { and } and
arrays using [ and ].
-
The REST community has come up with guidelines for creating
RESTful applications that implement Create, Retrieve
Update and Delete (CRUD) operations. The guidelines include:
-
Using HTTP POST for create, GET for retrieve, PUT
for update and DELETE for delete.
-
Defining preferred HTTP return status codes for
each operation, for example "201 Created" for a successful
POST.
-
JAX-RS provides an easy-to-use API for writing RESTful
resources (services) and clients in Java. It uses
annotations such as @Path and @GET to make it easy
to code. JAX-RS also provides an API for writing
filters that let you intercept messages to
to perform global operations such as security.
-
WS-Security is the specification for securing SOAP-based
web services. It defines standard headers that
describe how SOAP messages are signed and encrypted.
-
JSON Web Token (JWT) is an emerging standard for securing
RESTful applications. It uses digital signatures
to verify that message integrity and for authentication.
Since the tokens are passed on every message, RESTful
applications can remain stateless as recommended in
the principles of the RESTful architecture.