I already have a Jersey Service and want to get access via Restlet Client.

The Server Side looks like this:

    @Path("/ping")
    @RolesAllowed({"admin", "user"})
    public class ConnectedResourceBean {
        @GET
        @Produces("text/plain")
        public String getPingMessage() {             
        return "Hello World";
       }
 }

When I try to get a connection with restlet:

ClientResource = service = new 
ClientResource("http://localhost:8080/com-project-core/rest/ping";);
String myString = service.get(String.class);
System.out.println(myString);

 it gets stuckt and I dont get the Hello World message. I just get a Junit 
Error:  Not Acceptable (406) - Not Acceptable 

So when I remove @Produces("text/plain") on server side it works. Whats wrong 
about this? Do I need extra dependencies for that?

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2979990

Reply via email to