Saturday, 28 December 2013

Develop web service with JAX-WS or Axis2 or CXF

This tutorial demonstrate how to develop Hello User web service and followed by File Download web service development using JAX-WS. Finally developing a SAAJ client for processing Product Catalog web service.
MTOM uses XML-binary Optimized Packaging (XOP) packages for transmitting binary data. The solution with the large attachment with SOAP messages is the use of MTOM (SOAP Message Transmission Optimization Mechanism) which encodes binary data in base64Binary and sends the data as binary attachment rather than keeping it with actual SOAP message. MTOM provides an elegant mechanism to transfer binary data such as PDF, Doc, images, and other document types.Data Handler and Data Source APIs do the actual streaming part of the MTOM attachments.
This tutorial, the second of the three-part series, explains how to develop a File downloading web service using JAX-WS and also to send and receive Response from web service using SAAJ Client.
In order to follow along with this tutorial, you should have a basic understanding of Simple Object Access Protocol (SOAP) and related technologies, such as WSDL.
This tutorial series teaches the basic concepts of web services using different SOAP engines like Apache AXIS2, Apache CXF and JAX-WS. This tutorial series also provides a solution for sending large attachment with SOAP messages by using MTOM (SOAP Message Transmission Optimization Mechanism) which encodes binary data in base64Binary and sends the data as binary attachment rather than keeping it with actual SOAP message. This series also shows that by simply making method calls using the SAAJ API, you can read and write SOAP-based XML messages, and you can optionally send and receive such messages over the Internet.
Part 1 starts simply, explaining the basic concepts behind web services and showing you how to develop web service with Axis2 using Different Approach (Code First and Contract First).
Part 2 starts simply by developing a Hello User web Service with JAX-WS and then takes things a step further by showing an example of File Download web service(where client can download file from web service and store in its location)using MTOM with JAX-WS. It also shows how to invoke web service from SAAJ Client.
Part 3 simply shows how to develop a File uploading web service(where client can Upload file/attachment to Web service) using Apache CXF supports for MTOM with XOP implementation.

No comments:

Post a Comment