users@jax-ws.java.net

MTOM and SOAPHandler performance issue

From: <kristof.depraetere_at_agfa.com>
Date: Wed, 6 Dec 2006 09:10:19 +0100

Hi,

I use the SOAPHandler handler mechanism to add header information to the
SOAP message by my web service client.
However when MTOM is used to transfer large binaries (>3Mb) the
performance penalty is huge (300 times slower). Using MIME with
Attachments to transfer these binaries gives no performance impact in the
same scenario.

Apparently retrieving the SOAPPart from the messageContext is slow.

I use the following to add a header to the envelope:

        public boolean handleMessage(SOAPMessageContext messageContext) {
        // ...
        SOAPEnvelope envelope =
messageContext.getMessage().getSOAPPart().getEnvelope();
        SOAPHeader header = envelope.addHeader();
        //...
        }

I'm using 2.1EA3.

Any idea on how to speed this up?

Thanks,
Kristof