Search code examples
javaxmlwsdlaxiswsdl2java

Store Axis raw XML request/response in session (to be used in JSP)


How, if possible, do I get the raw XML request/response that is invoked/retrieved by Axis in my application?

I'm using WSDL2Java that is included with Axis to generate the Java stubs.

EDIT:

What I currently have is an app that uses Axis to handle the remote API calls.

One of the requirement is to 'store' all the XML request/response from these calls in the session so that it will be available in the JSP (for debugging purposes). How can I achieve this?

I tried writing a custom handler that extends BasicHandler but in that handler, I still can't get the HttpServletRequest/HttpServletResponse pair from the MessageContext


Solution

  • I end up using the solution described in this question

    Basically, I use it to get a hold of the HttpServletRequest and from there I set the proper item in the session.