300 likes | 383 Views
Axis2 Landscape Eran Chinthaka School of Informatics and Computing Indiana University. Pre-Axis2 Era Axis2 – Diving in to Architecture How all projects fit together Q&A. Agenda. About Me. Member, PMC Member and committer in Apache Software Foundation
E N D
Axis2 Landscape EranChinthaka School of Informatics and Computing Indiana University
Pre-Axis2 Era Axis2 – Diving in to Architecture How all projects fit together Q&A Agenda
About Me • Member, PMC Member and committer in Apache Software Foundation • PhD student in Indiana University, Bloomington, Indiana • Research on using usage patterns and knowledge-based techniques to improve job executions in large-scale systems (grids, clouds, etc)
Apache WS Timeline • Apache SOAP • Developed by IBM research team • Donated by IBM shortly after IBM joined the SOAP/WS initiative • Proof of concept • Apache Axis1 • SAX based • Handler architecture • Widely used in many products • WSS4J, Sandesha, Kandula, Pubscribe, WSRF support
Why Axis2 • Changes to Web service landscape mandated an extensible architecture • WS-Addressing , Reliable Messaging, WS-MEX • Performance • Parsers, message processing • Programming Abstractions • Asynchronous invocations, Message Exchange Patterns • Ease of use • Better APIs, Hot Deployment and other capabilities
Axis2 Features • High performance XML processing model • Extensible Messaging Engine • Rich Information Model • Pluggable module, data binding, transports architecture • Can support XMLBeans, ADB, JAXB, JiBX, etc., • Ability to plug-in any WS-* implementation • Easy to use deployment model • Convenient programming abstractions • WSDL 1.1, 2.0 and SOAP 1.1, 1.2 support • WSDL 2.0 HTTP binding, mimicing REST style invocations • Cloud computing support • Auto-scaling on Amazon • Clustering support
Axis2 Landscape • Community • Academic Usage • De-facto web services engine in research projects • Eucalyptus[1] • Industry Usage • Companies started consulting on Axis2 and/or building products on Axis2 • De-facto Web service engine for all the interoperability efforts [1]The Eucalyptus Open-source Cloud-computing System, Daniel Nurmi, Rich Wolski, Chris Grzegorczyk, GrazianoObertelli, Sunil Soman, Lamia Youseff, DmitriiZagorodnov, in Proceedings of 9th IEEE International Symposium on Cluster Computing and the Grid, Shanghai, China
Axis2 - Components Tools WSDL CodeGeneration Axis2 Engine Handlers Transports Information Model Deployment Model XML Model
XML Model • AXIOM (AXIs Object Model) • API is more like simplified DOM • Fundamental Difference • Data read and objects created on-demand using pull parsers • Allows direct access to the underlying pull stream with or without building the tree • Support for storing binary data • API also provides a StAX parser interface at any element • Allows the event based navigation of the OM tree.
Build object model to here h = envelope.getHeader(securityQName) ...and then you can do body = envelope.getBody(); reader = body.getXMLStreamReader(); while (reader.hasNext()) { ... } AXIOM Architecture- Deferred Building <soap:Envelope> <soap:Header> <myNS:Securitysoap:mustUnderstand=“true”> </myNS:Security> </soap:Header> <soap:Body> <doSomethingCool> ... MEGABYTES OF DATA HERE ... </doSomethingCool> </soap:Body> </soap:Envelope>
Message Processing Stages • Transport Receivers • Dispatching • AddressingBasedDispatcher • RequestURIBasedDispatcher • SOAPActionBasedDispatcher • SOAPMessageBodyBasedDispatcher • User Handlers • Message Receivers
Dispatching ….. POST /axis2/services/EchoXMLService/echoOMElementHTTP/1.1 User-Agent: Axis2 Host: 127.0.0.1 Content-Type: application/soap+xml; charset=UTF-8;action="EchoOMElement"; ..................... <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelopexmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing"> <soapenv:Header> <wsa:To>http://127.0.0.1:5556/axis2/services/EchoXMLService/echoOMElement</wsa:To> <wsa:ReplyTo> <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address> </wsa:ReplyTo> <wsa:MessageID>urn:uuid:AD147449058471C81E11506120248601</wsa:MessageID> <wsa:Action>urn:EchoOMElement</wsa:Action> </soapenv:Header> <soapenv:Body> <ns1:echoOMElement xmlns:ns1="http://org.apache.axis2/xsd"> <ns1:myValue>Isaac Asimov, The Foundation Trilogy</ns1:myValue> </ns1:echoOMElement> </soapenv:Body> </soapenv:Envelope>
Message Receiver • The last handler of the execution chain • MEP dependent (MEP ?? ) • Does the actual business logic invocation • Ability to write custom Message Receivers • Injects dependencies to services • Default Message Receivers • RawXMLINOnlyMessageReceiver • RawXMLINOutMessageReceiver • RPC*MessageReceiver
Message Exchange Patterns - MEP • Describes the exchange pattern of SOAP messages per given operation • In-Out • In only • In optional out
Deployment Model • Axis 1.x deployment requires you to • modify the XML files or • Call the admin client, add to the classpath, restart the server • Archive based deployment • Bundle all together and drop in • Directory based deployment (similar structure as archive ) • Hot Deployment • Archive file can contain • Class files, third party libraries, any other resources required by the service
Deployment Model – Axis2 Service • Can be deployed as an archive (.aar) file or as a directory with all necessary resources • Isolated – separate Class loader
Deployment Model – Axis2 Service • Service configurations are given by the services.xml • No need to have a WSDL around to be a valid service !!! • Contains • Exposed transports • Service scopes • Action mappings and message receivers • Modules to be engaged
Deployment Model – Axis2 Module <module name="addressing"> <Description></Description> <InFlow> <handler name="AddressingFinalInHandler" class="org.apache.axis2.handlers.addressing.AddressingFinalInHandler"> <order phase="PreDispatch"/> </handler> .............. </InFlow> <OutFlow> <handler name="AddressingOutHandle” class="org.apache.axis2.handlers.addressing.AddressingOutHandler"> <order phase="MessageOut"/> </handler> </OutFlow> <OutFaultFlow> ............. </OutFaultFlow> <InFaultFlow> ............. </InFaultFlow> </module>
Client Interaction API • Supports both blocking and non-blocking invocations models • Concept of callbacks for the client for non- blocking case • handle both transport dependent and transport independent asynchrony • sendRobust • fireAndForget • sendReceive • sendReceiveNonBlocking
Code Generation • Generates Java/C and other language stubs from given WSDL files • for invoking a Web service • Stub, callback handler, data bound classes, build file • For authoring a Web service • Skeleton, custom message receiver, services.xml
How WS Projects Fit Together • Apache Axis2 Java/C implementations • WS-Commons • Axiom – the XML object model • XmlSchema – Xml schema model used within code generation, WSDL models • Transports • Neethi – WS-Policy implementation • Modules • Sandesha – WS-Reliable Messaging implementation • Rampart, Rahas – WS-Security, WS-Secureconversation, WS-Security Policy, WS-Trust implementations • Savan– WS-Eventing implementation • WS-Addressing • WSS4j – Web services security implementation including XML security • Woden – WSDL 2.0 object model
Resources • Latest Information • http://ws.apache.org/axis2 • Feedback, bugs, questions • axis-user@ws.apache.org, axis-dev@ws.apache.org
What’s Next? • Axis2 in the real world • Axis2 hands on • Axis2 Security
Thank You !! • All committers and users who contributed to make Axis2 the best open source Web service engine • Special thanks to DeepalJayasinghe for sharing his slides • Data-to-insight lab for making this talk possible