September 26th, 2017

Web services in Java SE, Part 4

Core Java, Java Language, Java Platform, Java Web Development, others, Programing, by admin.

Parts 1 through 3 of this four-part series on developing Web services in Java SE first presented an overview of Web services and Java SE’s support for developing them. The series then focused on developing SOAP-based and RESTful Web services via this support. Part 4 wraps up this series by focusing on advanced topics.

This article first introduces Java SE’s SAAJ API for working with SOAP-based Web services at a lower level. It then discusses how to create a JAX-WS handler to log the flow of SOAP messages. Next, the article teaches how to create and install a custom lightweight HTTP server to perform authentication.

Moving on, you’re shown how to create a RESTful Web service that returns attachments (e.g., a JPEG image) to its clients. You then dig deeper into JAX-WS by exploring the interplay between providers and dispatch clients, and learn how to create a dispatch client that accesses the javax.xml.transform.Source instance returned from a Web service provider’s invoke() method via a different Source instance in another version of Part 3‘s LibraryClient application.

Working with SAAJ

Soap with Attachments API for Java (SAAJ) is the Java API for creating, sending, and receiving SOAP messages that may or may not have MIME-typed attachments. SAAJ is a lower-level alternative to JAX-WS for sending and receiving SOAP messages.

Back Top

Leave a Reply