Hi,

i am using a module in axis2 to log the incoming soap messages.
However, i noticed that when sending large files (via MTOM) from a client to my 
webservice, everything is slowed down by far. After some debugging i found out 
that the problem is related to the logging of the incoming message and not the 
webservice logic itself. The method "getEnvelope().toString()" of the 
messageContext seems to log attachments also, since the time spent in this 
method seems to depend on the file size of the attachment sent by the 
webservice client.

I am using the following code to log the soap message:
<code>
private void logIn(final MessageContext messageContext) {
    if (!logger.isDebugEnabled()) {
        return;
    }

    logger.debug("Logging incoming SOAP message");
    final String msg = messageContext.getEnvelope().toString(); // seems to log 
attachment also
    logger.debug(msg);
}
</code>

My module is part of the "PreDisptach" phase for incoming messages and 
"MessageOut" for outgoing messages, but i also tried to deploy the module in 
its own phase.

So my question is:
Is there someway to log the incoming soap message without reading the 
attachments sent by the client?

Regards,
Niko




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to