Saturday, July 29, 2017

Web Services

Web Services are mainly for 2 reasons:

1. For machine consumption
2. Language/Platform independent application development


According to J2EE spec, following are the categories of Web Services:
a) JAX-WS* :- SOAP based[Earlier JAX-RPC]
b) JAX-RS :- RESTful

SOAP Based / JAX - WS:
JAX-WS* Specifies various standards of how a communication of messages between source and destination(including intermediaries) to happen in a distributed Enterprise Architecture.


Theoretical Specification:
WS-Addressing
WS-Policy & WS-Security
WS-Federation
WS-Reliable Messaging
WS-Coordination
WS-Transaction
WS-Remote Portlets

Technologies in SOAP space: SOAP, XML, WSDL, XSD, JAXB, UDDI, SAAJ & ws-gen, ws-import

Most Important:-
WS-Addressing: SOAP message travels from a Source to Destination thorugh various intermediate nodes. Intermediaries are also web applications but they only process some part of the SOAP message then forward it to next node in the path. All addressing related intermediaries etc is contained in SOAP XML message as per WS-Addressing.

WS-Security: This ensures "message layer security" does not depend on Transport Layer(Or Protocol Specific) security. Means, SOAP-XML containing encrypted security information is carried along with the message preventing it from being intercepted by unintended recipients.

Sample SOAP Request and Response:










No comments:

How J2EE components work together in any Container - Spring or Application Server

In a Spring+Jersey+Hibernate RESTful webapplication, we can spot various J2EE components - JTA, JPA, Java Bean Validation, JSON-B API for B...