How to obtain SOAP request XML in @WebMethod methods of a JAX-WS web service

Solution Unverified - Updated -

Issue

  • I coded a simple web service using JAX-WS.
  • I need to have access to the SOAP request XML so that I can send the entire XML string back as CDATA in the response.
  • I tried doing that using injection with the @Resource WebServiceContext but I am not able to access the request XML string.
  • I used @HandlerChain and wrote a handler class that implements the SOAPHandler but I do not have a way of associating/connecting the xml in the handler class with the parameters that get passed into the web method itself.
  • What would be the best way to obtain the SOAP request XML?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.