protected void setSOAPResponseObject ( SOAPMessageContext context , Object newResponse ) { if ( newResponse == null ) { return ; } // Extract the SOAP Message SOAPMessage message = context . getMessage ( ) ; // Get the envelope body SOAPElement body ; try { body = message . getSOAPBody ( ) ; SOAPElement response = getSOAPResponseNode ( context ) ; body . removeChild ( response ) ; marshall ( newResponse , body ) ; } catch ( SOAPException e ) { logger . error ( "Problem changing SOAP message contents" , e ) ; throw CXFUtility . getFault ( e ) ; } }
Sets the return object for a response as the param .