users@jax-ws.java.net

Re[2]: MTOM and SOAPHandler performance issue

From: Sergey Shepelevich <sergey_at_shepelevich.com>
Date: Wed, 6 Dec 2006 11:23:13 +0200

Kristof,


Yes, it seems that handlers + MTOM are not compatible. I have asked JAXWS gurus about this issue at this thread:

http://forums.java.net/jive/thread.jspa?threadID=19746&tstart=0

So lets wait and see what they'll answer :)




>


Sergey, 


Sniffing the connection indeed shows that the binary is inlined into the SOAP message and no xop:Include is created. This explains why the performance hit is so big. 

So handlers and MTOM are not compatible for the moment? 


Thanks for pointing it out. 


Thanks, 

Kristof.






Sergey Shepelevich <sergey@shepelevich.com> 

06/12/2006 09:28 

Please respond to Sergey Shepelevich 

        

        To:        Kristof Depraetere/AMOVL/AGFA@AGFA 

        cc:        users@jax-ws.dev.java.net 

        Subject:        Re: MTOM and SOAPHandler performance issue




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 



-- 

Thanks,

Bytex