JBoss Community

Re: Unable to priint the content of SOAPBody

created by andreas_back in JBoss Web Services - View the full discussion

Hello!

 

Yes, the following code solved it for me

 

        MessageContext mc = webServiceContext.getMessageContext();
        SOAPMessage message = ((SOAPMessageContextJAXWS) mc).getMessage();
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        message.writeTo(byteOut);
        String request = new String(byteOut.toByteArray(), "UTF-8");

 

Greetings

 

Andreas

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community