Axis2 Landscape
-
Upload
eran-chinthaka-withana -
Category
Technology
-
view
2.262 -
download
1
description
Transcript of Axis2 Landscape
![Page 1: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/1.jpg)
Axis2 Landscape
Eran ChinthakaSchool of Informatics and Computing
Indiana University
![Page 2: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/2.jpg)
Agenda
• Pre-Axis2 Era
• Axis2 – Diving in to Architecture
• How all projects fit together
• Q&A
![Page 3: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/3.jpg)
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)
![Page 4: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/4.jpg)
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
![Page 5: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/5.jpg)
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
![Page 6: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/6.jpg)
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
![Page 7: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/7.jpg)
Axis2 Landscape• Community
• Academic Usage• De-facto web services engine in research
projects• Eucalyptus[1]
• Industry UsageCompanies 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, Graziano Obertelli, Sunil Soman, Lamia Youseff, Dmitrii Zagorodnov, in Proceedings of 9th IEEE International Symposium on Cluster Computing and the Grid, Shanghai, China
![Page 8: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/8.jpg)
Web services – Big Picture
![Page 9: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/9.jpg)
Axis2 – SOAP Processing Model
![Page 10: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/10.jpg)
Axis2 Engine
Axis2 - Components
Information Model
XML Model
Handlers
Deployment Model
Transports
ToolsWSDL CodeGeneration
![Page 11: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/11.jpg)
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.
![Page 12: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/12.jpg)
AXIOM Architecture- Deferred Building
<soap:Envelope>
<soap:Header>
<myNS:Security soap:mustUnderstand=“true”>
</myNS:Security>
</soap:Header>
<soap:Body>
<doSomethingCool>
... MEGABYTES OF DATA HERE ...
</doSomethingCool>
</soap:Body>
</soap:Envelope>
...and then you can dobody = envelope.getBody();
reader = body.getXMLStreamReader();
while (reader.hasNext()) { ...}
Build object model to here
h = envelope.getHeader(securityQName)
![Page 13: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/13.jpg)
Phases, Modules, Handlers
![Page 14: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/14.jpg)
Extensible Messaging Engine
![Page 15: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/15.jpg)
Message Processing Stages
• Transport Receivers
• Dispatching• AddressingBasedDispatcher• RequestURIBasedDispatcher• SOAPActionBasedDispatcher• SOAPMessageBodyBasedDispatcher
• User Handlers
• Message Receivers
![Page 16: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/16.jpg)
Dispatching …..POST /axis2/services/EchoXMLService/echoOMElement HTTP/1.1User-Agent: Axis2Host: 127.0.0.1Content-Type: application/soap+xml; charset=UTF-8;action="EchoOMElement";.....................
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns: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>
![Page 17: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/17.jpg)
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
![Page 18: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/18.jpg)
Message Exchange Patterns - MEP
• Describes the exchange pattern of SOAP messages per given operation• In-Out• In only• In optional out
![Page 19: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/19.jpg)
Information Model
![Page 20: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/20.jpg)
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
![Page 21: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/21.jpg)
Deployment Model – Axis2 Service
• Can be deployed as an archive (.aar) file or as a directory with all necessary resources
• Isolated – separate Class loader
![Page 22: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/22.jpg)
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
![Page 23: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/23.jpg)
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>
![Page 24: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/24.jpg)
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
![Page 25: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/25.jpg)
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
![Page 26: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/26.jpg)
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
![Page 27: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/27.jpg)
Resources
• Latest Information• http://ws.apache.org/axis2
• Feedback, bugs, questions• [email protected],
![Page 28: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/28.jpg)
What’s Next?
• Axis2 in the real world
• Axis2 hands on
• Axis2 Security
![Page 29: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/29.jpg)
Thank You !!
• All committers and users who contributed to make Axis2 the best open source Web service engine
• Special thanks to Deepal Jayasinghe for sharing his slides
• Data-to-insight lab for making this talk possible
![Page 30: Axis2 Landscape](https://reader034.fdocuments.in/reader034/viewer/2022052523/555df1f7d8b42a3f618b47f2/html5/thumbnails/30.jpg)
Questions !!