Showing posts with label WSO2 WSAS. Show all posts
Showing posts with label WSO2 WSAS. Show all posts

Tuesday, March 3, 2009

How to set up WSO2 WSAS on Apache Tomcat

WSO2 WSAS can be run standalone (When WSAS is run standalone it runs on a embedded instance of Apache Tomcat), but there may be instances where users would want to run it on another Application Server. This Knowledge-Base article from Chamara explains how WSO2 WSAS can be set up on Apache Tomcat.

Note : This applies for WSO2 WSAS 3.0 and above.

Thursday, February 26, 2009

How to add mediation to WSO2 WSAS

In a previous post I spoke about how service hosting capabilities can be added to WSO2 ESB. Now its time to do the reverse and show how mediation capabilities can be added to WSO2 WSAS.

This article from Ruwan explains the process in details. If you feel that you would like to see it in action instead of reading it then you could follow this screen case as well.


Friday, February 13, 2009

Using EDA in an SOA environment

Support for eventing was one of the new features that came with WSO2 Carbon based products. Eventing support which is powered by the Apache Savan project is available in both the WSO2 ESB as well as WSO2 WSAS.

This article by Asanka, titled "Fusion : Eventing with SOA - Introduction" gives an overview of eventing and EDA (Event Driven Architecture) together with an illustration on how it can be used in an SOA environment.

Monday, February 9, 2009

How to Cluster WSO2 Carbon based Products

Clustering for high availability and scalability is one of the main requirements of any enterprise deployment. As an Enterprise SOA offering WSO2 Carbon based products are capable of running in a clustered environment.

Well if that's the case how does one configure WSO2 products so that they can be clustered? Azeez, an Architect and Product Manager of WSO2 WSAS and Mr clustering at WSO2 has written a couple of articles that explain this in details. In the first article titled "Introduction to WSO2 Carbon Clustering" he explains some of the core concepts associated with WSO2 Carbon clustering. In his second article titled "WSO2 Carbon Cluster Configuration Language" he goes on to explains in detail the clustering configuration language used by WSO2 Carbon based products.

These articles apply to WSO2 WSAS (Web Services Application Server), WSO2 ESB (Enterprice Service Bus), WSO2 BPS (Business Process Server) as well as Apache Axis2.

Saturday, February 7, 2009

WSO2 WSAS (Web Services Application Server) 3.0 Released!


The 3.0 version of the WSO2 WSAS (Web Services Application Server) is now available for download. This version of the WSAS is built on the revolutionary WSO2 Carbon Framework which brings compartmentalization into SOA.

New features in this release include,
  • Enhanced admin UI
  • Extensible server admin framework
  • WS-Eventing support
  • Policy editor
  • Separable frontend & backend - a single frontend server can be used to administer several backend servers simultaneously
WSAS supports a number of WS-* specifications and standards which include,
  • SOAP 1.1/1.2
  • WSDL 1.1
  • WSDL 2.0
  • MTOM, XOP & SOAP with Attachments
  • WS-Addressing
  • WS-Security 1.0/1.1
  • WS-Trust
  • WS-SecureConversation
  • WS-SecurityPolicy
  • WS-ReliableMessaging
  • WS-Policy
  • WS-PolicyAttachment
  • WS-MetadataExchange
  • WS-Transfer
  • WS-Eventing
  • XKMS
WSO2 WSAS is released under the Apache Licence version 2.0. Download it tryit out and give us your feedback.

Sunday, January 4, 2009

How to deploy services on the WSO2 ESB

Whether or not an ESB should host services is a debatable topic and there is no right answer to it. Some do like to host services on their ESB while the others like to have their service deployment separated from service mediation. I personally like the idea of having my services separated from the mediations.

The WSO2 ESB (Enterprise Service Bus) did not allow deploying services on it right up to the 1.7 release. But we did have a few customers who wanted that feature. Now with the revolutionary WSO2 Carbon framework (Which all future generations of WSO2 products will be built on) users can have their ESB just the way they want. The traditionalist who prefer to have there services separate from mediations could use WSO2 WSAS and the WSO2 ESB. For those who want service deployment on their ESB, its just a matter of grabbing the service deployment components and dropping it into your ESB. Charitha has written a nice little blog post that explains how this could be done.

Sunday, November 23, 2008

WSO2 WSAS 3.0-alpha2 is now Available

WSO2 WSAS 3.0-alpha2 is now available for download. This version of WSO2 WSAS is based on revolutionary the WSO2 Carbon framework. Do try it out and give us your early feedback.

The process of Carbonizing the Mashup Server will start soon... Stay tuned for more news on the revolutionary Carbon framework from WSO2.

Tuesday, October 14, 2008

Customer uses WSO2 products to Increase Productivity

This article shows how Concur used the WSO2 Enterprise Service Bus (WSO2 ESB) and the WSO2 Web Services Application Server (WSO2 WSAS) to increase there productivity. It also states that the solution was build in a mere 3 hours whereas it took 3 weeks to build it with pure Java. The following is a quote from the article,

"In the initial deployment, the WSO2 data services technology was able to access the database and convert data into a SOAP message in "literally two minutes," according to Svee. During a training session with WSO2, the Concur team used the "WSO2 ESB to replicate a data synchronization system in three hours that the group had previously taken three weeks to build in Java.""

Thursday, September 25, 2008

Enabling JSON in WSO2 WSAS

In order to enable JSON support in WSO2 WSAS you will need to follow the following steps.
  1. Drop the axis2-json-1.4.1.jar (The version may change according to the WSAS version in use) in to the WSAS lib directory. You could download axis2-json-1.4.1.jar here.
  2. Drop the jettison-1.0.1.jar in to the WSAS lib directory. You could get it from here.
  3. Configure the axis2.xml in WSAS which can be found in the conf directory as described in "Enabling JSON in Apache Axis2".

HTTP Content Negotiation with Apache Axis2

Since the 1.3 release of Axis2, it supports HTTP Content Negotiation. It is not turned on by default but can be done so by adding the following parameter to your axis2.xml.

<parameter name="httpContentNegotiation">true</parameter>

Axis2 does not honor the content-type text/xml when its in the Accept Header. This is because the content-type text/xml is primarily used for SOAP 1.1 but when a request is sent via the browser it has the Accept header as "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 ". If we were to honor text/xml this would result in a SOAP 1.1 response. Not too good for a REST scenario ha! This is the result of the same content-type (text/xml) been used for two message formats (SOAP 1.1 and POX).

Now lets get back to HTTP Content Negotiation with Apache Axis2. Performing a GET request on the version service would result in the following request and response. You could capture them by using TCPMonitor.


Now try editing the Accept header to "application/json/badgerfish". You should have enabled JSON support for this to work. This would result in,


A blog post on how to enable JSON on Axis2 will follow. This configuration can be used to enable HTTP Content Negotiation on WSO2 WSAS as well as the Mashup Server. It should work with Synapse and the WSO2 ESB too but I haven't checked it.

Wednesday, September 17, 2008

Apache Axis2 java2wsdl Usage - Graphical Tool

It seems that quite a few people are having trouble using the java2wsdl tool that comes with Axis2. Using a command line tool can be tricky for some users... but wait there is a graphical tool for this too. WSO2 WSAS (Web Services Application Server) has a graphical tool that wraps the java2wsdl utility in Axis2. You can either try it out by downloading WSAS (WSO2 WSAS is open source and available under Apache License v2.0) or if you are in a hurry you could try the java2wsdl graphical tool online. This tool takes you through a wizard like approach and is much easier to use (The tool hosted online is based on WSO2 WSAS 2.3 which is in turn based on Axis2 1.3 with a few bug fixes). You could fine a lot more tools that could help you at http://wso2.org/tools.

For the geeks who do not want to use the graphical tool this is how the command line utility can be used. Simple executing the java2wsdl script without any arguments would show you its usage,

keith@keith:/opt/axis2-1.4.1/bin$ sh java2wsdl.sh
Using AXIS2_HOME: /opt/axis2-1.4.1
Using JAVA_HOME: /opt/software/java/jdk1.5.0_06
Usage: java2wsdl [options] -cn <fully qualified class name>

where [options] include:
-o <output location> output directory
-of <output file name> output file name for the WSDL
-sn <service name> service name
-l <soap address> address of the port for the WSDL
-cp <class path uri> list of classpath entries - (urls)
-tn <target namespace> target namespace for service
-tp <target namespace prefix> target namespace prefix for service
-stn <schema target namespace> target namespace for schema
-stp <schema target namespace prefix> target namespace prefix for schema
-st <binding style> style for the WSDL
-u <binding use> use for the WSDL
-nsg <class name> fully qualified name of a class that implements NamespaceGenerator
-sg <class name> fully qualified name of a class that implements SchemaGenerator
-p2n [<java package>,<namespace] [<java package>,<namespace]...
java package to namespace mapping for argument and return types
-p2n [all, <namespace>] to assign all types to a single namespace
-efd <qualified/unqualified> setting for elementFormDefault (defaults to qualified)
-afd <qualified/unqualified> setting for attributeFormDefault (defaults to qualified)
-xc class1 -xc class2... extra class(es) for which schematype must be generated.
-wv <1.1/2.0> wsdl version - defaults to 1.1 if not specified
-dlb generate schemas conforming to doc/lit/bare style

Most often that not you wont be using most of these options. Assuming that your,
output directory is /home/keith/projects/axis2_rest/resources/
output Filename is StudentService.wsdl
service name is StudentService
classes are in the directory /home/keith/projects/axis2_rest/classes
service implementation class is prg.apache.axis2.StudentService
you need WSDL 2.0

your usage of java2wsdl would be,

sh java2wsdl.sh -wv 2.0 -o /home/keith/projects/axis2_rest/resources/ -of StudentService.wsdl -sn StudentService -cp /home/keith/projects/axis2_rest/classes/ -cn org.apache.axis2.StudentService

Saturday, September 13, 2008

Attachments - MTOM, SWA and Base64Binary Compared

Sending Attachments in Web Services is a common use case and there are various ways in which this objective could be achieved. Sending the Attachments as MTOM (SOAP Message Transmission Optimization Mechanism), SWA (SOAP with Attachments), or Base64Binary are some of your options.

Here is a simple comparison between these 3 options.
  • base64Binary sends the attachments as base64 inline in the SOAP message. i.e. The Attachment in embedded in the SOAP Message. Bloats the message by 33%.
  • SWA sends the Attachment outside the SOAP message (The SOAP message contains a reference to the attachment). But the SOAP infoset does not contain the attachment
  • MTOM Provides the best of both world. The Attachment is sent outside the SOAP message with a reference to it but the attachment appears as if it is embedded in the SOAP message (The SOAP infoset contains the attachment)
Due to the fact that attachments sent using MTOM appear as it the attachment is part of the SOAP message it allows you to use other WS-* QOS (Quality of Service) attributes. For e.g MTOM messages can be signed and encrypted using WS-Security. Thus this provides a mechanism to send Secured Attachments without the need for additional specs.

Axis2 as well as (WSO2 WSAS) supports all three of the above mechanisms. In a later post I will describe how each of the above can be used and how the actual wire messages look.