axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolaus Krismer"<r...@krismer.de>
Subject Howto log incoming soap "the right way" (without attachments)?
Date Fri, 15 Apr 2011 08:57:56 GMT
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: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message