users@jax-ws.java.net

Re: MTOM and SOAPHandler performance issue

From: Sergey Shepelevich <sergey_at_shepelevich.com>
Date: Wed, 6 Dec 2006 10:28:44 +0200

Hi,


Are you sure you have MTOM working with handlers ? We have an issue with it, when we add any header into SOAP message,

MTOM doesnt work. Looks like the new header is resetting MTOM and it stops working. 



>


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





-- 

Thanks,

Bytex