users@glassfish.java.net

JAX-RS (Jersey) on Java 6 Endpoint

From: <glassfish_at_javadesktop.org>
Date: Tue, 25 Aug 2009 08:54:24 PDT

From what I can tell it is supposed to be possible to publish a RESTful web service using the built-in Java 6 Endpoint. But I can't figure it out.

Perhaps I have a dependency issue, but ultimately it's boilding down to this line of code failing.

[code]RuntimeDelegate.getInstance().createEndpoint(app, javax.xml.ws.Provider.class);[/code]

which gives me:
[pre]Exception in thread "main" java.lang.IllegalArgumentException: No container provider supports the type interface javax.xml.ws.Provider
        at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:183)
        at com.sun.jersey.api.container.ContainerFactory.createContainer(ContainerFactory.java:130)
        at com.sun.jersey.server.impl.provider.RuntimeDelegateImpl.createEndpoint(RuntimeDelegateImpl.java:74)
[/pre]

I've added the following to my classpath:
jsr311-api.jar
jersey-server-1.0.3.1.jar
jersey-core-1.0.3.1.jar
jersey-json-1.0.3.1.jar
jersey-simple-1.0.3-SNAPSHOT.jar (links are broken for this one, 1.0.3 snapshot is the best I can find)

Can anyone post an example of using JAX_RS that does not use Grizzly or any other App Server (i.e. GlassFish). I want a lightweight solution that is easily embedded in my app... I already use the built-in Java 6 Endpoint for a JAX-WS service.

Thanks,

Scott
[Message sent by forum member 'swpalmer' (scott.palmer_at_2connected.org)]

http://forums.java.net/jive/thread.jspa?messageID=361869