question: private void sendResponse ( Document doc , MessageFactory messageFactory , String contentType , HttpServletResponse res ) throws IOException , SOAPException { SOAPMessage reply = messageFactory . createMessage ( ) ; SOAPHeader header = reply . getSOAPHeader ( ) ; header . detachNode ( ) ; SOAPBody replyBody = reply . getSOAPBody ( ) ; res . setHeader ( "Content-Type" , contentType ) ; replyBody . addDocument ( doc ) ; reply . saveChanges ( ) ; OutputStream os = res . getOutputStream ( ) ; reply . writeTo ( os ) ; os . flush ( ) ; }
target:  Send a response back to the client. This could be either a SOAP fault or a correct DSML response.