Popular Posts

Thursday, February 14, 2008

The simplest method of deploying an Axis2 web service

I think Apache Axis2 is the most effective, efficient and useful open source java web service framework ever written. Not only that, if you are new to Java web services, Axis2 provides a lot of handy tools and mechanisms in order to start exploring WS technology. One of the easiest way of learning Axis2 is start with POJO (Plain old Java objects). You may wonder that you can deploy a java class as an Axis2 service in one line of code!!!
Lets have a look...

1. Write a java class

2. Add following line inside the main method of your class
new AxisServer().deployService(SimplePojo.class.getName());

Make sure to add Axis2 libraries in your class path. (Axis2-1.3 can be downloaded from here)

3. Open your favorite browser and issue http://localhost:6060

4. You will see that your java class is exposed as an web service.

Here is the complete sample code which can be copied to your IDE and play with it.

package org.test;

import org.apache.axis2.AxisFault;
import org.apache.axis2.engine.AxisServer;

public class SimplePojo {

public int addnumbers(int x, int y){
return x+y;
}

public static void main(String[] args)throws AxisFault {
new AxisServer().deployService(SimplePojo.class.getName());
}
}

7 comments:

srggy said...

The larger that the head size is for your babolat pure drive, the more power you will be provided with. Additionally, a larger wilson k six size means a larger sweet spot which is why beginners as well as intermediate players often prefer to work with a head microgel with a larger head size. Additionally, thicker frames are also capable of generating more power as well. Smaller head sizes on prince-o3-tour on the other hand are capable of providing less power, but significantly more control cheap tennis racquets.new polos men poloswomen polosdiscount polossummer polospolo shirts whosalepolo fashionembroodered polostennis racketsclothing poloclothingedhardyshirtedhardyclothingsummer ed hardy clothingcheap shirtsed hardy brand.

srggy said...

Although many people criticize ed hardy clothing for having nothing but tattoo patterns, being filled with waste and useless things, it is widely acknowledged that ed hardy clothes draws the most attention of both common young people as well as many Hollywood welcomed stars for its punk ed hardy t-shirts rock styles. As a matter of fact, in such a world where all ed hardy shirts are much like each other, ed hardy mens creates yet another totally new global sensation in fashion crowd for ed hardy womens fancy design. An increasing number of people are charmed by the magic of amazing tattoo and impressive color of ed hardy sunglasses.

srggy said...

In this version of the ralph lauren polo, the styling and fabric is advertised as being made out of "playdry" material. Burberry Polo Shirts is another performance fabric which is intended to add luxury Cheap polo shirts, coolness, and moisture wicking qualities. Performance fabrics wholesale polo shirtswere originally created primarily for athletes and other sports enthusiasts who work up a good sweat ralph lauren polo shirts. The moisture wicking fabric in cheap ralph lauren polos draws the moisture away from the body which then evaporates quickly discount ralph lauren polos. ralphlaurenpoloshirts keep the body cooler and drier even when the athlete is under physical duress polo clothing.

srggy said...

polo ralph lauren RED! Series of design criteria - stylish, simple, self-cultivation. For the first time in 2009 in New York Fashion Week debut, RED! Series has a new Polo Shirts On Sale series from the traditional burberry polos LOGO, LOGO traditional crocodile logo at the Ralph Lauren Polo Shirts letter above, and the new series of letters with the cheappolos logo in line to be between a red symbol of Burberry Polo Shirts.

swimingfidh said...

Come here to have a look of our Wholesale Jeans
Many fashionMens Jeans ,eye-catching
Womens Jeans ,and special out standing
Blue Jeans ,you can spend less money on our
Discount Jeans but gain really fine jeans, absolutely a great bargain.
www.crazypurchase.com
China Wholesale
wholesale from china
buy products wholesale
China Wholesalers
http://www.weddingdressseason.com

swimingfidh said...

There are ed hardy shirts
,pretty ed hardy shirt for men,

ed hardy womens in the ed hardy online store

designed by ed hardy ,
many cheap ed hardy shirt ,glasses,caps,trouers ed hardy shirts on sale ,

You can go to edhardyshirts.com to have a look ,you may find one of ed hardy clothing fit for you
Top qualitymen's jacket,
These cheap jacket are on sale now,you can find
north face jackets inmage on our web
Ralph Lauren Polo Shirtsbuberry polo shirts

Do you wannaghd hair straighteners for you own , we have many
cheap ghd hair straightenersin style and great,you can choose one from these
hair straighteners
Authentic chaussure puma
chaussure sport
And chaussure nike shoes

swimingfidh said...

http://sweetygirlbirdylove.blog126.fc2.com/
http://wholesale-from-china-susan.blogspot.com/
http://caihongbao.blog126.fc2.com/
http://alisasweetybabyb.blog.shinobi.jp/
http://kurumaro.com/alisasweetybaby/
http://yahoewholesales.blogspot.com/
http://susanyahoe.blog126.fc2.com/
susanyahoe.wordpress.com
suanyaheo.blogsome.com
http://sexywomenjeans.blogspot.com/
http://eliotkusith.blog126.fc2.com/
http://eliotsmart.edublogs.org/
http://blog.qlep.com/blog.php/eyecatchingjeans
http://uniquejeanscloset.blogspot.com/
http://andrewmirrerredjean.blog126.fc2.com/
http://d.hatena.ne.jp/uniquejeans/
http://blog.goo.ne.jp/uniquejeanslove/
http://www4.atword.jp/unequejeansfans/
http://johnwired123.blog126.fc2.com/
http://d.hatena.ne.jp/johnwired123/
http://ameblo.jp/johnwired123/
http://www.seriousblogging.com/johnwired123/
http://mybrandnewclothes123.blogspot.com/