1 Reply Latest reply on Feb 2, 2012 9:28 AM by Steffen Krause

    Newbie Question

    forum data Newbie

      I am just starting to learn about web services. I have found several methods to implement web services in Jboss. We do not use EJB in our environment. Can you please suggest what would be an ideal way to implement web services in Jboss. Also is there a difference in the implementation for jboss 4 and jboss 7.

       

      Thanks,

        • 1. Re: Newbie Question
          Steffen Krause Newbie

          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