-
1. Re: Newbie Question
kimba74 Feb 2, 2012 9:28 AM (in response to forumdata)Hi there,
Yes, there is also the possibility of implementing WebServices as POJOs (Plain Old Java Objects). What you would do is: Create a regular Java Class and annotate it with the exact same annotations used for the EJB approach. The major difference between the POJO and the EJB approach is that POJOs have no definied life-cycle in an Application Server. In other words, JBoss does not know that this POJO is in fact a WebService. To make JBoss aware of that you would have to configure your WebService POJOs as Servlets inside a WAR's web.xml. Upon deploying this WAR file JBoss will notice that the Servlets you have configured are actually WebServices rather than Servlets and will deploy them accordingly.
Here is a guide for JAX-WS implementation using POJOs:
https://docs.jboss.org/author/display/JBWS/JAX-WS+User+Guide