Hi Sam,

I don't know. Do you checked the rootURL you request? Perhaps they differs. Just log them. Perhaps this causes trouble. If I remeber right, a Router routes to one of it's goals, but not require, that it consume the full remaining path.

best regards
  Stephan

Bao,Sam schrieb:
Stephen,

Do you know why this would return a 200, but yet it doesn't actually make the 
http call?

                Request request = getRequest();
            Reference rootRef = request.getRootRef();
            String rootURL = rootRef.getHostIdentifier();
            String rootPath = rootRef.getPath();
                //produces "http://<hostname>:<port>/<path>
            if (rootPath != null && rootPath.trim().length() > 0) {
                rootURL = rootURL + rootPath;
            }
            Client c = new Client(Protocol.HTTP);
            //test conditions resource
            if (TRACER.isEnabled()) {
                TRACER.trace("Test Conditions Resource");
            }
            c.start();
            Response r = c.get(rootURL + "/conditions");  <-------Calling 
another resource as if simulating a call from a client (ie firefox, ie, safari).
            c.stop();
            Status status = r.getStatus();
            if (TRACER.isEnabled()) {
                TRACER.trace("Status: " + status + ". Description: " + 
status.getDescription());
            }
            if (!Status.SUCCESS_OK.equals(status)) {
                throw new Exception("Conditions GET failed. Status: " + status + ". 
Description: " + status.getDescription());
}
This code is inside a resource's GET, which then calls another resource in the 
same application.  When I run this piece locally in eclipse, alls fine, and the 
call to '/conditions' resource runs.  However, when I deployed this piece of 
code to Tomcat or Websphere, I get back a status of 200 (and no exception is 
thrown), but it doesn't appear that the '/conditions' resource actually gets 
called.  Anyone have a clue as to why?

Reply via email to