2

I have a requirement to log the REST request and response messages, so I have used apache wing RequestHandler. And I am able to get the response using the ResponseHandler. But unable to get the Request details in Handler Class. Could you please help me on this?

public class RESTRequestHandler implements org.apache.wink.server.handlers.RequestHandler {

@Override
    public void handleRequest(MessageContext context, HandlersChain handlerChain)
            throws Throwable {
        //Unable to fetch the request details..Issue is here
        handlerChain.doChain(context);
            }

}

public class RESTResponseHandler implements org.apache.wink.server.handlers.ResponseHandler {
@Override
    public void handleResponse(MessageContext context, HandlersChain handlerChain)
            throws Throwable {
//Able to get the response details using the below code
   SampleResponseObject object=(SampleRespObject) context.getResponseEntity();
            }
}
1
  • what error are you getting while fetching the request? Commented Dec 22, 2016 at 15:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.