0 Replies Latest reply on Dec 28, 2008 6:43 AM by as6o

    Questions on creating web-services-centric Seam environment

    as6o
      I'm working on creating a web-services-only Seam environment and am wondering if I'm going about it the right way.

      The first thing I'm trying to do is remove as much JSF stuff as I safely can.  Then I installed the resteasy stuff (I'll probably eventually move to enunciate but resteasy is good enough for now.)

      So, given this I have some simple RESTful+JAXB requests working.  However, one issue I had with the SeamResourceServlet is that when I set the URL pattern to /* the REST stuff worked but none of the normal resources (images, etc.) worked.  I had to stick a directory level in there (i.e. /seam/*) for both the resources and REST to work.  Am I doing something wrong here?  I'd like "<webapp>/" to be where the resources live and "<webapp>/rest" to be where the REST web services live.

      Another issue I'm now having is with tests.  I'm trying to figure out how to write a test that fires up the embedded jboss and makes a RESTful call and then inspects the resulting XML.  I'm looking at the NonFacesRequest stuff and the parameter for it is "viewid".  Does this mean I can only use the test stuff with JSF?  Is there a way to do a simple get/post and inspect the response and still have it go through the Seam lifecycle?

      A third issue I'm having has to do with events and redirection.  Normally you can redirect to a different view given an event (session timeout, etc.)  How would I instead respond with a separate REST response?  Can I hit a different seam component and have it produce the REST response in the case of an event?

      Any help with these questions will be greatly appreciated.

      Thanks,
      -Aaron