Apache Sandesha and Apache Axis 2 Jaliya Ekanayake

  • Slides: 19
Download presentation
Apache Sandesha and Apache Axis 2 Jaliya Ekanayake

Apache Sandesha and Apache Axis 2 Jaliya Ekanayake

Agenda n n n Apache Axis 1. X Current Implementation of Apache Sandesha Apache

Agenda n n n Apache Axis 1. X Current Implementation of Apache Sandesha Apache Axis 2

Axis 1. X n n n Support synchronous Web service invocations Handlers participate for

Axis 1. X n n n Support synchronous Web service invocations Handlers participate for header processing Fixed handler path inside the engine Engine does not support “pausing” the message context Engine does not support addressing Client Side Server Side

WS-Relibale. Messaging n n n Based on two endpoint managers Endpoint managers provide a

WS-Relibale. Messaging n n n Based on two endpoint managers Endpoint managers provide a transparent message path Client should have an addressable endpoint Web service request and the response (if any) is handled in two different sequences Delivery Assurance (INORDER etc. . ) Reliable Messaging Model

WS-RM Example Client Service Create. Sequence. Request Create. Sequence. Response Web service Request Acknowledgement

WS-RM Example Client Service Create. Sequence. Request Create. Sequence. Response Web service Request Acknowledgement Retransmissions and Ack Requests RM Source Terminate. Sequence Similar message exchange to send the response back RM Destination

Sandesha Architecture Typical message exchange Axis Architecture of Sandesha on top of Axis

Sandesha Architecture Typical message exchange Axis Architecture of Sandesha on top of Axis

Features and Problems n n n WS-Relibale. Messaging is fully implemented Interoperable with IBM,

Features and Problems n n n WS-Relibale. Messaging is fully implemented Interoperable with IBM, Microsoft and Systinet Difficult to integrate with WS-Secure. Convercation and other WS-* that require asynchronous behaviors

Axis 2 n n n n n Engine based on one-way messaging AXIOM –

Axis 2 n n n n n Engine based on one-way messaging AXIOM – Based on St. AX Modules and Handlers Message Receivers Synchronous and Asynchronous Messaging support MEP Support WS-Addressing MTOM/SWA Hot deployment

Axis 2 Architecture Main Components of Axis

Axis 2 Architecture Main Components of Axis

SOAP Processing Model SOAP Processing model of Axis 2 n Based on one-way engine.

SOAP Processing Model SOAP Processing model of Axis 2 n Based on one-way engine. ¨ ¨ n Flexible Handler Chains ¨ ¨ ¨ n Flows Modules Ordering of handlers using “phases” Message. Receivers ¨ n engine. send(); engine. receive(); MEP Support Capability to Pause Messages

AXIOM- Axis Object Model n n Differed building Pull based parsing with St. AX

AXIOM- Axis Object Model n n Differed building Pull based parsing with St. AX //create the parser XMLStream. Reader parser = XMLInput. Factory. new. Instance (). create. XMLStream. Reader(new File. Reader(file)); //create the builder OMXMLParser. Wrapper builder = OMXMLBuilder. Factory. create. St. AXSOAPModel. Builder(OMAbstract. Factory. get. SOAP 11 Factory(), parser); //get the root element (in this case the envelope) SOAPEnvelope envelope = (SOAPEnvelope) builder. get. Document. Element ();

Flows n n n Flows represents different message paths in Axis 2 engine Collection

Flows n n n Flows represents different message paths in Axis 2 engine Collection of handlers in a flow Global and Operation specific flows Message Flows in Axis 2

Handlers, Phases and Modules n n Handler ¨ Same concept as in Axis 1.

Handlers, Phases and Modules n n Handler ¨ Same concept as in Axis 1. X Phases ¨ Mechanism to arrange handlers. ¨ System defined phases n E. g. Transport. In, Pre. Dispatch, Post. Dispatch ¨ User Defined Phases n Logging, Security, RM Module ¨ Collection of handlers ¨ May be in different phases axis 2. xml

Handlers, Phases and Modules contd. . n E. g. Logging Module public class Logging.

Handlers, Phases and Modules contd. . n E. g. Logging Module public class Logging. Module implements Module { // initialize the module public void init(Axis. Configuration axis. System) throws Axis. Fault {} // shutdown the module public void shutdown(Axis. Configuration axis. System) throws Axis. Fault {} } Logging. Module. java module. xml

Client API n Available Invocation Methods ¨ ¨ ¨ One-way messaging Blocking with Single

Client API n Available Invocation Methods ¨ ¨ ¨ One-way messaging Blocking with Single Channel Non-Blocking with Single Channel Blocking with Dual Channel Non –blocking with Dual Channel

Proposed Architecture for WS-* in Axis 2 Module 1 Module 2 Client Out Handler

Proposed Architecture for WS-* in Axis 2 Module 1 Module 2 Client Out Handler Context 1 Context 2 Client In Handler Out Flow In Flow

Questions?

Questions?

References: n http: //ws. apache. org/axis/java/architecture-guide. html http: //schemas. xmlsoap. org/ws/2005/02/rm/ http: //ws. apache.

References: n http: //ws. apache. org/axis/java/architecture-guide. html http: //schemas. xmlsoap. org/ws/2005/02/rm/ http: //ws. apache. org/axis 2/Axis 2 Architecture. Guide. html http: //ws. apache. org/axis 2/mtom-guide. html n http: //ws. apache. org/axis 2/OMTutorial. html n n

Thank You!

Thank You!