users@jersey.java.net

How to expose (programatically) an instance of a web service?

From: Igor Moochnick <igor.moochnick_at_gmail.com>
Date: Sat, 4 Jul 2009 14:14:16 -0400

If I have a definition of a web service, i.e.:

@Path("/srv")
public class MyService
{
   @GET
   public void action(@Context UriInfo uri)
   { ... }
}


How can I expose its instance via Jersey from within my code?

I.e.:

MyService service = new MyService();
   service.setSomething(...);

   // How do I host it?


Thanks!

I've posted this question on StackOverflow and still don't have an answer:

http://stackoverflow.com/questions/911813/what-is-the-best-way-to-write-a-test-case-for-jersey-web-services



    Regards,

        IgorM