Tuesday, July 15, 2014

Introduction to JAXR, JAX-RPC, SAAJ and JAXB

JAXR (Java API for XML Registries)

JAXR provides standard Java API for accessing web service registries such as UDDI (Universal Description, Discovery and Integration), ebXML (Electronic Business XML) and others. JAXR allows clients to find information about published web services through those registries. Service provides also can publish their services in the registries using JAXR.

JAX-RPC (Java API for XML-based Remote Procedure Calls)

This Java API is used to create web services and web clients that performs remote procedure calls to access the web service. RPC model enables the clients  to use services on remote systems. 

Source : docs.oracle.com

How it works

  1. A Java method executes on a stub.
  2. The stub executes routines in the JAX-RPC Runtime System (RS).
  3. That RS converts the request into a SOAP message.
  4. RS transmit the message as an HTTP request.

Advantages of JAX-RPC

  1. Can be used any language (Platform independent)
  2. Java or non-Java clients can access the web service.
  3. Hides the complexity of SOAP messages from developer.
  4. Highly flexible, because JAX-RPC uses technologies defined by W3C.

SAAJ (SOAP with Attachment API for Java)

This is used to transport SOAP messages over the internet. Developers can send and receive SOAP messages in the Java platform using SAAJ. Developers can use it to write SOAP messaging applications instead of using JAX-RPC.

JAXB (Java API for XML Binding)

This API is used to map XML document to Java object. This allows you to develop applications that creats Java object which map to an XML document. This allows you to work with XML data using OO (Object Oriented) technologies without knowing the underlying structure of XML document.

No comments:

Post a Comment