0 Replies Latest reply: Feb 7, 2012 5:13 AM by 890792 RSS

    SUN JAVA WEB SERVER: Access denied error

      Hi all,

      I have deployed a RESTful web service on SJWS version 7 on a separate server machine.

      I am trying to test the web-service using a test client, the code snippet is as follows:

      ClientConfig config = new DefaultClientConfig();
      Client client = Client.create(config);
      WebResource webResource = client.resource("http://<server machine name>:<port number>/RESTHelloWorldExample/rest/test");

      but the above gives me an access denied response status code (401).

      I have tried by deploying the same web-service on my local tomcat server and a remote glassfish3 server where its getting called properly. I have even tried putting the machine's IP address in the URL above but it did not resolve the problem.

      I am trying to test a PUT request here and the JDK version being used on the SJWS is JDK6.

      Can someone please suggest on the same?