3 Replies Latest reply on Aug 30, 2009 8:30 PM by donakalz

    Seam+Enunciate?

    as6o

      Hello,


      I'm trying to get a pure WS environment using Seam and Enunciate.  In doing this I'm trying to strip out all of the JSF stuff and then get Enunciate to insert all of the WS stuff.


      I got the WS parts to work.  I was able to make a very simple Web Service object (for both SOAP and REST requests) and was able to call it successfully.  However, the Seam parts don't seem to be working well.


      I made my simple service object a Seam-managed component, and according to the logs Seam detected it and registered it.  The problem I'm seeing is that none of the bijection appears to be working.  The result is always a null reference.


      My simple web service is below:



      @WebService
      @Path("/webservice")
      @Name("WebServiceTest")
      public class WebServiceTest {
      
           @In CurrentTime currentTime;
           @Logger private Log log;
           
           @GET
           @Path("/result/{name}")
           public WebServiceResult getResult(@PathParam("name") String name) {
                log.info("Hi there", null);
                Date time = currentTime.getCurrentTime();
                WebServiceResult result = new WebServiceResult();
                result.setName(name);
                result.setDate(time);
                return result;
           }
      }



      In this case both currentTime and log are null.


      I've tried various combinations of filters/servlets in web.xml and am wondering what is the minimum needed to get this to work.  My goal is to keep it as simple as possible.  No JSF but have support for the Seam lifecycle, AOP/annotations, EL expressions, etc.


      Thanks for any assistance.


      -Aaron

        • 1. Re: Seam+Enunciate?
          as6o

          Forgot the mention that I'm using Seam 2.1.1 and Enunciate 1.8.


          Again, thanks.


          -Aaron

          • 2. Re: Seam+Enunciate?
            sbasinge

            Did you add web:context-filter regex-url-pattern=/webservice to your components.xml?   I believe that its required to get seam components installed for the deployed webservices.

            • 3. Re: Seam+Enunciate?

              Hi Aaron,


              I am wondering, did you use eclipse to set up your enunciate? I am having problems getting enunciate to install. I am using eclipse 3.5, jbossas 5.0.0, jbossws 3.2 and richfaces 3.3.1. If you have any pointers on how I can configure my web service project to use enunciate, that would be stellar! cheers.


              Charlie.