Professional Documents
Culture Documents
0 and Apache
Woden
Sagara Gunathunga
Apache Committer
Who am I ?
Apache Woden Committer
Also contribute to Apache Axis2 and
Apache Camel .
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
HOW ?
WHERE ?
WHAT it does ?
Define the purpose and function of its operations.
Define the messages that need to be exchanged in
order to engage the operations.
Define data models used to define the structure of the
messages.
Define a set of conditions under which the operations
are provided.
Define information about how and where the service
can be accessed.
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
Todays SDLs
WSDL 1.1 ( Web Service Description Language 1.1)
WADL ( Web Application Description Language)
SSDL (SOAP Service Description Language)
WSDL 1.1
WSDL is an XML-based language used to define
Web Services and describe how to access them.
WSDL is an XML format for describing network services as
a set of endpoints operating on messages containing either
document-oriented or procedure-oriented style.
WSDL 1.0 was Jointly developed by IBM, Microsoft and
many others in 2000.
WSDL 1.1 released in 2001.
Compliant with WSDL Basic profile 1.0
WSDL 1.1
Pros
Proven and Widely used in industry for last few years.
Compliant with WS-I basic profile 1.0
Many projects available - WSDL4J , WOM
Code generation tools available
Axis2 /CXF WSDL2Java ,wsimport
Cons
Really complex language.
Hard learning curve.
Not fit with REST services.
WADL
WADL is a description language for HTTP-based Web
applications, such as applications which follow the
REST architectural style.
Pros
Works well with REST services.
Automation tools available WADL2JAVA , Google REST compiler
Some projects available
- Jersey
Cons
Still not widely used as WSDL 1.1
Doesn't support for SOAP based web services.
SSDL
The SOAP Service Description Language (SSDL) is a
SOAP-centric contract description language for Web
Services
Pros
Works well with SOAP based web services.
Project available - Soya for C#
Cons
Not widely used in neither industry nor academic purposes.
Only support for SOAP.
No automation tools available .
No project for java.
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
Introduction to Apache Woden
WSDL 2.0 and REST
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
WSDL 2.0
Improved version of WSDL 1.1
Simple and no ambiguities unlike WSDL 1.1 and easy
learning curve.
Fully supports for both SOAP based and RESTful web
services.
Removal of message constructs. These are specified
using the XML schema type system.
WSDL 2.0
Well defined Message Exchange Patterns (MEP)
Some WS engines already supports and provide
automation tools
- Axis2 and WSDL2Java
Wsdl1.1/2.0 Comparison
WSDL 1.1
WSDL 2.0
<definition>
<description>
<portType>
<interface>
<binding>
<binding>
<types>
<types>
<service>
<service>
<port>
<endpoint>
<message>
Within <operation>
In-Only
Robust In-Only
In-Out
In-Optional-Out
Out-Only
Robust Out-Only
Out-In
Out-Optional-In
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
type="http://www.w3.org/ns/wsdl/http"
whttp:methodDefault="xs:string"?
whttp:queryParameterSeparator
Default="xs:string"?
whttp:cookies="xs:boolean"?
whttp:contentEncodingDefault="xs:string"? >
Example
<wsdl2:binding name="DemoServiceHttpBinding"
interface="tns:DemoServiceInterface"
type=http://www.w3.org/ns/wsdl/http >
<wsdl2:operation
ref="tns:demo"
whttp:method="POST"
whttp:location="demo />
</wsdl2:binding>
Output format -
HTTP Method
Default Input
Serialization
Default Output
Serialization
GET
application/x-wwwform-urlencoded
application/xml
POST
application/xml
application/xml
PUT
application/xml
application/xml
DELETE
application/x-wwwform-urlencoded
application/xml
Example
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
Apache Woden
Main deliverables
1.
2.
3.
4.
5.
6.
Two APIs
Component model API
Mirror the component model of WSDL 2.0
One root Description object representing a merge of all
.wsdl files imported and included
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
To Element model
aComponent.toElement()
Example
DescriptionElement descElement;
Description descComponent;
descComponent=descElement.toComponent();
descElement=descComponent.toElement();
OR
WSDLFactory FWSDLFactory=
WSDLFactory.newInstance(org.apache.woden.internal.DOMWSDLFactory);
For OM implementation
WSDLFactory FWSDLFactory=
WSDLFactory.newInstance(org.apache.woden.internal.OMWSDLFactory);
WSDLFactory FWSDLFactory=WSDLFactory.newInstance();
//create WSDL reader instance
WSDLReader reader=FWSDLFactory.newWSDLReader();
//set validation
reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
//read the WSDL file in to a DescriptionElement
WSDLFactory FWSDLFactory=WSDLFactory.newInstance();
//create WSDL writer instance
WSDLWriter writer=FWSDLFactory.newWSDLWriter()
//Write WSDL in to the console
writer.writeWSDL(descElem, System.out )
//write WSDL as a file
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
Example
reader.setFeature(WSDLReader.FEATURE_VALIDATION, true);
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
Outline
Introduction to SDLs
Todays SDLs
Introduction to WSDL 2.0
WSDL 2.0 and REST
Introduction to Apache Woden
Hands-on Apache Woden
Apache Woden tools
What is new in Apache Woden 0.9
WSDL 2.0 based WS development in Axis2
OR
wsdl2java -wv 2 .0
http://localhost:8080/services/SimpleService?wsdl2
Contribution
Site : http://ws.apache.org/woden/
Mailing list : woden-dev@ws.apache.org
Thank You