users@jersey.java.net

Re: [Jersey] How to expose (programatically) an instance of a web service?

From: Arman Djusupov <arman_at_noemax.com>
Date: Tue, 07 Jul 2009 13:01:46 +0300

Hi

If you mean hosting service as standalone application, check this tutorial:
https://jersey.dev.java.net/use/getting-started.html

With best regards,
Arman


Igor Moochnick wrote:
> 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
>