Archive for the ‘WSO2 WSAS’ Category

There are many ways you can write a web service and deploy it in WSO2 WSAS application server environment. I already to explained how to deploy your POJO service in Eclipse platform.
Here I’ll explain in detail the top down approach(Contract first) using WSAS admin console. I don’t use Eclipse platform here. An WSO2 Oxygentank article, “Deploying Web Services using Apache Axis2 Eclipse Plugins” explain using Eclipse plugins for deploying your web services using contract first approach.

I started code generating for POWSDL

I used the WSO2 WSAS admin UI to generate my service code. Select the WSDL2Java tool under tools menu.  In the -uri option select the wsdl from your filesystem and upload it. I selected the options -ss, -sd and -u.  When you click generate it will generate the code and download it to your local file system as a zip file.

I unzipped this file and add my server code at src/org/wso2/carbon/core/services/po/POServiceSkeleton.java as

public org.wso2.carbon.core.services.po.BuyStocks buyStocks
(org.wso2.carbon.core.services.po.BuyStocks buyStocks)
return buyStocks;

Note that at the root of the unzipped folder there is a pom.xml file. So you execute mvn to build your source. If you have a maven repository already with required jars it is advised to use mvn with -o option so that maven will not download already existing jars in your repository.

When the build is completed you will have target/build/lib/POService.aar ready to be deployed in WSO2 WSAS.

I then uploaded this in to WSAS as an Axis2 service. To do that in WSAS admin UI under services menu select add Axis2 Service sub menu. Then just browse to your aar file and click upload. Your POService will be listed in the services list.



Read Full Post »

I wanted to try create a web service using my POJO style bean without going too much detail into Axis2. I found this useful tutorial by Saminda.
However although it was too easy to get a Axis2 service deployed into WSO2 WSAS server, I had to struggle a bit in Ubuntu Karmic platform. Following I explain what happened there.

In the tutorial it does not mention that we need Eclipse IDE for EE developers. Either you need to use this or upgrade your Eclipse IDE for Java developers for EE. First I downloaded the EE version and tried it. However in my machine it had some stability issues with Eclipse and it crashed serveral times. So I installed Eclipse Java developer version. Note that I had to install all JST related plugins in addition to EE plugin for Eclipse in order to get this work.

Once I had my Eclipse ready for J2EE the rest of the tutorial went smoothly and in less than one minite I could deploy my service in WSO2 WSAS and try it.

Read Full Post »

Try Open Source SOA!

Good read, Mike Kavis explains the strength of open source SOA. In this article he also explain the WSO2 SOA stack.


You can find news release for the case study which is mentioned in Mike’s article here.  You can download the case study here.

Read Full Post »

Deepal’s Axis2 Book

After delaying for several months after purchasing the book I finally found time to read Deepal’s new Axis2 book. But once I started to read it is one go read.

Nice thing about the book is that for a person who has fair knowledge of web services concepts the book immediately make him familier with Axis2 in a very short time. If a developer need to use Axis2 for his web services project this is the best way to get him started because he can grasp the essentials within a days’ time by reading the book.

Although the book says that it is for Java developers it is good read for Axis2/C developers as well because it describes basically the same architecture(Of course there are differences but when it is taken as a whole it is still very useful). In tern it is good read for all who are interested in Axis2/C related/based stacks as well like WSF/C, WSF/PHP, WSF/Ruby, WSF/Python and WSF/Perl.

When I purchased the book I have following things in mind.

1. Axis2/C is based on Axis2/Java architecture. At the time we developed Axis2/C, Axis2/Java is already passed through it’s initial developer versions and we learned the architecture with discussions with the community as well as by directly diving in to the code base. But once Axis2/C is matured we rarely looked back into the Axis2/Java deeply. But we know that there is major changes going on through discussions with community. So I needed to update easily on new changes.

2. To share the views of a major Axis2/Java contributor.

3. Just because it is on Axis2 and by Deepal !!!.

But my aims 1 and 2 are not fully satisfied because it turned out to be very introductory book and I found anything new rarely. Also there are no views just facts in compact order on Axis2. But no worries. I really enjoyed reading the book because of its easy flowing style.

There should be a sequel to this book preferably an advanced book, a kind of a mastering version. These days the interest is not basically on the core but on many projects based around Axis2 like Synapse, WSO2/ESB, WSO2/Mashup server etc etc and there should be books on each of these subjects as well.

Actually Samisa has actually started the trend by writing a nice book called RESTful PHP Web Services which I believe is based on WSF/PHP. Very much keen on having a good read of the book and will tell about it in future.

Finally the book’s design is very attractive and invites for reading. However there were errors I found on the book which does not affect the overall aspect of the book.

Read Full Post »

One of the best way to get you immediately get aware of the concepts


Read Full Post »

There is this new implementation of Reliable Messaging from WSO2 called Mercury. You can download it from here. There is discussion going on as to whether Mercury should be sequal to Sandesha2 as Sandesha3 or not. Ppl who argue against it has basically following points

1. When adding features to current Mercury it will ultimately become as complex and as ugly as Sandesha2. In other words they have concerns whether Mercury solve existing Sandesha2 problems.

2. Sandesha2 is tested for performance and results are satisfactory and have doubt about Mercury performance.

3. Sandesha2 is feature rich.

4. Mercury still only provides only a very basic feature set and therefore they can’t adopt it at this stage.(RM 1.1 spec is not supported)

What those ppl accept in general is that

Sandeha2 is complex and need lot of improvement and that improving is not easy.

Ppl who argue in favour in Mercury have following points

1. Mercury architecture is based on a state model which is clean.

2. It would not be susceptible for race conditions and dead locks(I heard some ppl worry about that in Sandesha2)

3. Mercury is open for improvements and they beleive that it could be done in a cleanly fasion.

I am these days considering implementing Mercury/C for Axis2/C web services platform. When I had an initial look at the architecture diagrams and Mercury/Java code I understand that it is actually very clean and easy to adopt for writing Mercury/C, although I am not satisfied with the quality of the architecture documents that shipped with the Mercury release. It seems that nobody has reviewed it. For example it mention CSR but nowhere it has defined what is CSR(Of course Create Sequence Response). I must thank Amila Suriarachchi for coming up with this innovative design. I will continue to analyse Mercury architecture and most probably  will implement Mercury/C  which  I beleive could be completed in about 3 months time once started.

Read Full Post »