axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolaus Krismer"<>
Subject Howto log incoming soap "the right way" (without attachments)?
Date Fri, 15 Apr 2011 08:57:56 GMT

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:
private void logIn(final MessageContext messageContext) {
    if (!logger.isDebugEnabled()) {

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

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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message