apache axis2 in actionpeople.apache.org/~deepal/xml06/apache_axis2_in_action.pdf · writing a...
TRANSCRIPT
![Page 1: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/1.jpg)
Apache Axis2 in action
Deepal Jayasinghe - WSO2 Inc.
![Page 2: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/2.jpg)
About me
● I am a senior software engineer working at WSO2
● PMC Member Apache Web services● Working in Axis2 projects since its day
one● Contribute to a number of Apache
projects
![Page 3: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/3.jpg)
About WSO2● Open source Web service middleware technology com-
pany.● World-class open source leadership● Focus on Apache Web services projects● Creating easy to use, high performance products● XML and Web centric services and integration ready ap-
plications● Development in Java , C and PHP● Emphasis on interoperability standards, integration and
SOA● Head quartered in Boston,USA● Office in UK and Sri Lanka
![Page 4: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/4.jpg)
Agenda
MotivationUnderstanding and working with AxiomLearning Axis2 basicsUnderstanding the deployment modelWriting a service and deploying Writing a module and deployingWorking with client APIA practical scenarioStub and skeleton generationAxis2 and POJOs
![Page 5: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/5.jpg)
Motivation for Axis2
History of ASF SOAP engines Apache SOAPAxis 1.x designed as a follow-on
Why do we need a new SOAP engine?Changes to the Web services landscape
WS-A, WS-RMPerformance
Parsers, Optimizing based on useEase of use
Deployment of new capabilities, service deploy-ment
![Page 6: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/6.jpg)
AXIOM
![Page 7: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/7.jpg)
New XML Infoset Representation
Known as AXIOM (AXIS Object Model)NOT, just another XML object model
API is more like a simplified DOMFundamental difference ?
Objects are created “on demand” using a pull modelAllows direct access to the underlying pull stream with or without building the treeSupport for storing binary data
![Page 8: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/8.jpg)
New XML Infoset Representation Cont…
API also provides a StAX parser interface at any element
Allows the event based navigation of the OM tree.
![Page 9: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/9.jpg)
New XML Infoset Representation Cont…
![Page 10: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/10.jpg)
New XML Infoset Representation Cont…
In built binary storage supportCan store binary (unchanged) Supports XOP/MTOM
XOP(XML Optimized Packaging)/ MTOM(Message Transmission Optimization Mechanism)??
![Page 11: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/11.jpg)
AXIOM and Axis2
AXIOM is the primary means of representing / manipulating the XML message inside Axis2
![Page 12: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/12.jpg)
Time to Dig Into Code..
Code samples to explain AXIOMSerializationDeserialization XPath navigation
![Page 13: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/13.jpg)
Axis2 Basis
![Page 14: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/14.jpg)
Phases, Modules, Handlers
![Page 15: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/15.jpg)
Extensible Messaging Engine
![Page 16: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/16.jpg)
Message Processing Stages
There are three main stagesTransport Receiver
Transport related processingDispatching
Finding service and operationMessage Receiver
Last handler of the chain
![Page 17: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/17.jpg)
Dispatching
Two types of dispatchingFinding the corresponding descriptionsFinding the corresponding contexts
Default dispatchers AddressingBasedDispatcherRequestURIBasedDispatcherSOAPActionBasedDispatcherSOAPMessageBodyBasedDispatcher
![Page 18: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/18.jpg)
Dispatching ctd...
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 19: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/19.jpg)
Message Receiver
The last handler of the execution chainMEP dependent (MEP ?? )Does the actual business logic invocationAbility to write custom Message ReceiversInjects dependencies to servicesSome default Message Receivers
RawXMLINOnlyMessageReceiverRawXMLINOutMessageReceiverRPC*MessageReceiver
![Page 20: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/20.jpg)
Message Exchange Patterns - MEP
Describes the exchange pattern of SOAP messages per given operation.E.g.
In – OutIn OnlyIn – In – Out !
WSDL 2.0 defines 8 standard MEPs.Axis2 supports all inbound MEPs
![Page 21: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/21.jpg)
Contexts and Descriptions Hier-archy
Descriptors keep static informationInformation extracted from deployment descriptors
Contexts keep runtime informationThis Information needs to be in various scopesGood to keep them separate!
![Page 22: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/22.jpg)
![Page 23: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/23.jpg)
Parameters and Properties
ParametersDefining a parameters The “locked” attributeSetting and gettingParameter can be any objectgetting the original OMElement from the parameterRetrieving parameters (getParameter)
PropertiesDifference between property and parameterRetrieving properties (getProperty)
![Page 24: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/24.jpg)
Deployment Model
![Page 25: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/25.jpg)
What's the Fuss with Deployment ?
Axis 1.x deployment requires you to:Either modify the XML files
or Call the admin clientAdd to the classpathRestart the server
For a beginner, a bit of headache
![Page 26: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/26.jpg)
New Deployment Model
Archive based deploymentBundle all together and drop in
Directory based deployment (similar structure as archive )Hot Deployment Archive file can contain;
Class filesThird party librariesAny other resources required by the service
![Page 27: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/27.jpg)
Axis2 Service
![Page 28: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/28.jpg)
Axis2 Service
Can be deployed as an archive (.aar) file or as a directory with all necessary resourcesIsolated – separate Class loader
![Page 29: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/29.jpg)
Service Descriptor
Service configurations are given by the ser-vices.xml
No need to have a WSDL around to be a valid service !!!Contains
ServiceClass parameterName spaces Expose transportsService scopeOperation
actionMappingMessageReceiver
Modules to be engaged
![Page 30: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/30.jpg)
Service vs. Service Group
Deploying multiple services togetherShare data across services in a groupMaintain sessions across a service group us-ing contextsExample use case of a Service Group
LoginDo somethingLog out
![Page 31: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/31.jpg)
Service Scope
Request scopeSOAP session scope
Service group IDTransport session scope
Cookies Application scope
![Page 32: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/32.jpg)
Back to Coding
Writing services.xmlWith single serviceFor a service group
Writing service class Explain dependency injectionMethods for life cycle management
Co-relating WSDL file to a service
![Page 33: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/33.jpg)
Axis2 Module
![Page 34: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/34.jpg)
What is a Module ?
Modules define the way of extending Axis2 Encapsulates a specific functionality (mostly a WS-* function)
e.g. Addressing module adds WS-Addressing support
Usually consists of a set of handlersModules are not hot deployable
Because they change the overall behaviour of the sys-tem
![Page 35: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/35.jpg)
Inside an Axis2 Module
What does it contain ?Module descriptor : module.xml
(more in the next slide)Module implementation classHandlersThird party libraries
Can be deployed as an archive file Bundle all together and deploy
Can be deployed as a directory as wellIsolated – separate class loader
![Page 36: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/36.jpg)
Module Descriptor
<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 37: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/37.jpg)
Availability and Engaging of Modules
Concept of AvailabilityPresence of the module in the system
Concept of EngagingActivating the moduleCan be done
Per SystemPer Service groupPer ServicePer Operation
![Page 38: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/38.jpg)
Back to Code ...
Sample module with two handlersSample module with a module implementation classExplains
InitengageNotifyshutdown etc.
![Page 39: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/39.jpg)
Client API
![Page 40: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/40.jpg)
ServiceClient
Supports both blocking and non-blocking in-vocations models
Concept of callbacks for the client for non- blocking case
Can handle both transport dependent and transport independent asynchrony.
![Page 41: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/41.jpg)
Invocation Patterns
sendRobustfireAndForgetsendReceivesendReceiveNonBlocking
![Page 42: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/42.jpg)
Operation Client
Why do we need Operation client ?Service Client has a set of operation clients
• If you need more control use OperationClient
![Page 43: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/43.jpg)
What are Options ?
Why do we need options for the client ?What is included in options ?
Addressing informationSOAP action (wsa:action)Transport data Properties
![Page 44: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/44.jpg)
There's Nothing Like Code to Ex-plain it!
Simple Client written from scratch Invoke using all the available patterns
Working with operation clientAn example dynamic clientHow to use RPCServiceClient
![Page 45: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/45.jpg)
Practical use case• Creating a session aware service • Implementing a client to invoke the
service• Deploy the service in different scopes
and see the behaviour
![Page 46: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/46.jpg)
Code Generation
![Page 47: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/47.jpg)
Code Generationjava org.apache.axis2.wsdl.WSDL2Code
Usage WSDL2Code -uri <Location of WSDL> :WSDL file location-o <output Location> : output file location-a : Generate async style code only. Default if off-s : Generate sync style code only. Default if off. takes precedence over
-a-p <package name> : set custom package name-l <language> : valid languages are java and csharp. Default is java-t : Generate TestCase to test the generated code-ss : Generate server side code (i.e. skeletons).Default is off-sd : Generate service descriptor (i.e. axis2.xml).Default is off.Valid with
–ss-u : unpack classes-f : flatten output-ns2p : namespace to package mapping-d: choose databinding model – adb, xmlbeans, jibx none
![Page 48: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/48.jpg)
Generated Code:Client
StructureStubEmpty Callback HandlerDatabinding classes - Depends on the selec-ted databinding frameworkAnt build file
![Page 49: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/49.jpg)
Generated Code: Service
StructureSkeletonCustom Message Receiverservices.xmlWSDL file
![Page 50: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/50.jpg)
Code Again...
Codegen demonstration with the command line toolGenerate skeleton , fill that and deploy Generate stub and invoke a service
![Page 51: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/51.jpg)
Resources and Contribution
For more information and latest newshttp://ws.apache.org/axis2www.wso2.net
All the samples and presentation slides are available to download
http://http://people.apache.org/~deepal/xml06/
![Page 52: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/52.jpg)
Questions ?
[email protected] Don’t forget to use [Axis2] prefix in the sub-ject
IRC channel#apache-axis
![Page 53: Apache Axis2 in actionpeople.apache.org/~deepal/xml06/Apache_Axis2_in_action.pdf · Writing a module and deploying ... Optimizing based on use Ease of use Deployment of new capabilities,](https://reader034.vdocuments.site/reader034/viewer/2022051405/5a9c3ddf7f8b9a451b8e317d/html5/thumbnails/53.jpg)
Thank you!!!!!!