Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc.

Why : The Future of Web Services Paul Fremantle WSO2 Inc.

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 1 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. About Me ...  Apache Software Foundation - Member  Apache Web Services - PMC Member  Apache Axis2, Axiom – Committer, Release Manager.  - Committer  Member of W3C Working Group for WS- Addressing, WSDL 2.0  Working with WSO2 on Apache Axis2, Apache Axiom, Apache Synapse and WSO2 Tungsten.

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 2 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Agenda

 Introduction and Motivation

 The “big picture”

 Key Features of Apache Axis2  High Performance XML Processing Model  Extensible Messaging Engine  Pluggable Module Architecture  Improved Deployment Model  New Client API  Optional Pluggable Data Binding  REST Support  Other Improvements

 Summary and Conclusion

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 3 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. A Quick Look At SOAP Stacks First Generation :: Apache SOAP

 First Apache driven SOAP stack  SOAP carries RPC requests & responses in XML form  Apache SOAP  Based on DOM  Slower and memory intensive

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 4 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. A Quick Look … Second Generation ::

 Based on SAX  Introduced the handler architecture for SOAP stacks  Faster and better than Apache SOAP  Wide Industry Acceptance  Integrated to major application servers like WebSphere and JBoss  Highly Interoperable

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 5 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Motivations for Apache Axis2

 Limitations of handler architecture  Inherent request/response nature

 Need for more document centric interactions  Need for more asynchrony

 Need to support new specifications like WSDL 2.0 and various QoS protocols  WS-A, WS-RM, WS-SX

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 6 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Motivations for Apache Axis2

• Performance – Parsers, Optimizing based on use • Ease of use – Deployment of new capabilities, service deployment

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 7 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Axis2 Architecture - The “big picture”

C lie n t A P I Server API

Engine Transports

> > > Phases > > >

R epository Core

Services Repository

Modules Axiom

STAX

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 8 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Key Features of Axis2

 New XML Infoset Representation  Deferred building  StAX integrated  Extensible Messaging Engine  Pluggable Module Architecture  Improved Deployment Model  New Client API  Optional Pluggable Data Binding  REST Support

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 9 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc.

New XML Info-set Representation

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 10 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. New XML Info-set Representation

 Known as AXIOM (Axis Object Model)  Yet another XML object model?  API is more like a simplified DOM  Fundamental Difference ?  Objects are made “on demand” using a pull model  Allows direct access to the underlying pull stream with or without building the tree  Support for storing binary values  Support for multiple implementations

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 11 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Axiom Streaming

Build object model to here h = envelope.getHeader(securityQName) ... MEGABYTES OF DATA HERE ... ...and then you can do body = envelope.getBody();

reader = body.getXMLStreamReader();

while (reader.hasNext()) { ... }

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 12 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. New XML Info-set Representation

 API also provides a StAX parser interface at any element  Allows the event based navigation of the OM tree.

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 13 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc.

New XML Infoset Representation

AXIOM

O M E le m e n t.g e tC h ild re n () e tc

S T A X O M B u ild e r. API getDocum entElem ent() O M Element.serialize() Read (tre e )

P u ll s tr e a m

Push stream

S A X O M B u ild e r. getDocum entElem ent() OMElement. getXM LStream R eader() AXIOM O M Factory.createOM Elem ent()

P u ll s tr e a m

Push stream

API Write (tree)

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 14

Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Improved Deployment Model

 Faster and Easier Deployment  Service Archive files (.aar files)  A collection of resources needed for a service  Includes  Service implementation  Handlers (optional)  Service descriptor (services.)

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 16 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc.

Improved Deployment Model (Continued)

 Hot Deployment  “Drop in” deployment  Uploaded through  File system  Axis2

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 17 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Message Receivers

 The link between Axis2 and your service application  Either a simple “POJO” MR  Calls a Java object  Or code-generated from WSDL  Part of the WSDL2Java

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 18 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Tools

 WSDL2Java

 Takes a WSDL  Generates either client or server components  Or both!  Plus an Ant build script  Plus the Services.xml  Java2WSDL  Takes a Java class and generates WSDL for you  Used when dealing with Java clients

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 19 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Skeletons

 Generates a custom Message Receiver  Plus a “skeleton”  You fill in the code

Paul Fremantle – Why Apache Axis2 : The Future of Web Services Page 20 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2, Inc. Pluggable Data Binding

 How to provide data binding support ?  Use a well established framework  Avoid reinventing the wheel!  Flexible  Adds more functionality  e.g. XMLBeans supports the complete XML Schema  Features an API that can bind to another data binding framework

Paul Fremantle – Why Apache Axis2 : The Future of Web Servi