2 Replies Latest reply on Jan 17, 2009 6:23 PM by Miloslav Vlach

    REST service with Seam 2.1.1GA

    Miloslav Vlach Novice

      Hi, I'm trying to develop application that uses the REST. I create sample component



      @Path("/testurl")
      @Name("testUrl")
      public class RemoteTest implements RemoteTestLocal {
           @WebRemote
           @GET
           @ProduceMime("text/plain")
           @Path("/customerId")
           public String testIt(@PathParam("customerId")int id) {
                System.out.println("Asdfasdfas: " + id);
                return "aaa";
           }
      }





      with interface


      @Local
      @Path("/testurl") 
      public interface RemoteTestLocal {
           @WebRemote
           public String  testIt(@PathParam("customerId")int id);
      }



      and put all libraries to WEB-INF lib (resteasy, ...)


      But when I go to the page a get the 404 (The requested resource () is not available.)


      I'm using non EJB version, packaged as WAR file. Is this function only for EBJ or not ?


      Know somebody how to develop REST ?


      So the SOAP version (@WebService is only for EJB version, or not ??


      Thanks Mila