Hi,
I had the following custom response handler for logging http error codes:
public class HttpErrorResponseLogger implements ResponseHandler {
private Logger log = Logger.getLogger("HttpErrorResponseLogger");
@Override
public Response handleResponse(Message message, OperationResourceInfo
info,
Response response) {
int status = response.getStatus();
if(status > 399 && status < 600) {
Object method =
message.get(Message.HTTP_REQUEST_METHOD);
Object url = message.get(Message.REQUEST_URL);
Object queryString = message.get(Message.QUERY_STRING);
log.error("Responding with HTTP status " +
response.getStatus() +" for "+ method +
" " + url + "?" + queryString);
log.error("Responding with message body: " +
response.getEntity());
}
return response;
}
}
The response code and entity are populated but the method, url and
queryString always return null. I wondered if it was possible to get the
originating request info just to log some extra information.
Thanks
Jon
--
View this message in context:
http://cxf.547215.n5.nabble.com/Is-it-possible-to-get-the-originating-request-URL-in-a-Custom-Response-Handler-tp5712129.html
Sent from the cxf-user mailing list archive at Nabble.com.