Hi Everybody!

I have currently developed a simple Axis handler, that logs all
incoming/outgoing messages to files on the local HDD.

Here is my current code:

@Override
        public InvocationResponse invoke(MessageContext arg0) throws AxisFault {
                
                logger.debug("entering invoke");
                
                SOAPEnvelope env = arg0.getEnvelope();           
                
                String fileName = this.MESSAGE_LOGGING_DIR + this.FILE_PRAEFIX 
+ new
Date().getTime() +".xml";
                
                try {
                        File msgFile = new File(fileName);
                FileWriter out = new FileWriter(msgFile);
                out.write(env.toString());
                out.close();
                } catch (IOException ioex) {
                        logger.error(ioex.getMessage());
                }
                
                return InvocationResponse.CONTINUE;
        }


Unfortunately this code fails as soon as I send attachments. In this case,
the call "SOAPEnvelope env = arg0.getEnvelope();" fails with an OutOfMemory
Exception as not the whole SOAPEnvelope can be read into the memory.

Does anyone have a solution or a hint on how to achive this goal with a
Streaming approach?

Thanks in Advance for both your time and your knowledge!

Greetings
Stefan
-- 
View this message in context: 
http://www.nabble.com/Log-Incoming-Outgoing-SOAP-Messages-tp19267334p19267334.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to