Thursday, July 09, 2009

using jaxws 2.1 for exposing web services

jaxWS 2.1 simplifies web service development for java based applications. It is very easy to expose your pojo service classes as web services just using web service annotations.

Just put @WebService annotation on your service class, that's all . You can also restrict number of methods to be exposed using @WebMethod annotation on methods of exposed service class.

For the GlassFish V2 you dont have to add anything to web.xml file for the web services. All of required definitions will be added by GlassFish during the deployment. On the other hand , for the tomcat, you have to add listener definitions into web.xml file to run web services.

During the deployement all classes containing web service annotations are scanned by AS and required web service classes are generated using wsgen tool. For this process you need JDK that contains wsgen and apt tools. If you specified jre you will get the following error message during deployment.

com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class {0} is not found. Have you run APT to generate them?

Labels:

3 Comments:

Anonymous Anonymous said...

This i a wonderful blog ..nice to read this about web services.
web design company

11:04 PM  
Blogger Unknown said...

Great content you have been updated in your blog. Its really informative too. Thanks..
Seo forum india

12:52 AM  
Blogger flightblog said...

If you're not ready to book just now, Google Flights can keep an eye on your selected dates, route and other parameters, emailing you whenever there's a price change. Just click the Track prices toggle. That's about as simple as it gets. To manage the various flights you're tracking, click the Menu icon, then Tracked prices. book google flights online from google-flights.online

11:05 PM  

Post a Comment

<< Home