JAX-WS with JBoss

JBoss supports JAX-WS out of the box. There is not much configuration files needed, only a servlet-mapping in the web.xml. This is how the web-service java file looks like:

Its a POJO with a @WebService annotation. All you have to do is map this as a servlet in the desired context. Though this is not a servlet per-se, the JBoss web container does the rest. This is how the web.xml looks like:

After deploying, you can access the webservice by http://localhost:8080/JBossWebServiceTest/UserService?wsdl.

You can find the sources https://github.com/paawak/blog/tree/master/code/JBossWebServiceTest

And the war https://github.com/paawak/blog/tree/master/code/JBossWebServiceTest/dist

Leave a Reply

Your email address will not be published. Required fields are marked *