axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: MTOM Message is not Optimized
Date Fri, 14 May 2010 17:52:30 GMT
Hope below paragraph helps 

When this property is set to true any SOAP envelope which contains 
optimizable content (OMText nodes containing binary content with 
optimizable flag "true") will be serialized as a MTOM optimized message. 
Messages will not be packaged as MTOM if they did not contain any 
optimizable content even though MTOM is enabled. But due considering the 
policy assertions, there may be a policy saying, all the request should be 
optimized eventhough there are any optimized contents. To support this 
phenomenon there is an entry called "forced mime" which has to be set as
        ServiceClient serviceClient = new ServiceClient ();
        Options options = new Options();

Axis2 serializes all binary content nodes as Base64 encoded strings 
regardless of they are qualified to be optimize or not, if

Yogesh Dhake 
05/11/2010 11:40 AM
Please respond to


MTOM Message is not Optimised


I try to enable MTOM for my Axis 15.1 Client connecting to a .NEt WSE 3 
Web Service.
All Works fine eaven the MEssages are in MTOM MIME format.
But the big binary parts are not optimized with MTOM.

My Element from WSDl is:


I send 512 Kb or 1 MB by fileData but they are always send in base64 
Calling code is like:

WormRaidStub.Add param4 = new WormRaidStub.Add();
DataSource source = new BinaryDataSource(buffer);
param4.setFileData(new DataHandler(source));

Soap message is like:
POST /iTernity/iTernity.asmx HTTP/1.1
Content-Type: multipart/related; 
start-info="application/soap+xml"; action=""
User-Agent: Axis2
Transfer-Encoding: chunked

Content-Type: application/xop+xml; charset=UTF-8; 
Content-Transfer-Encoding: binary
Content-ID: <>

<?xml version='1.0' encoding='UTF-8'?>

<wsse:Security xmlns:wsse="
" soapenv:mustUnderstand="true">
<wsse:UsernameToken xmlns:wsu="
" wsu:Id="UsernameToken-122130810">
<wsse:Password Type="
<wsu:Timestamp xmlns:wsu="
" wsu:Id="Timestamp-1120194637">

<ns1:Add xmlns:ns1="">

What went wrong?
What can I do?

-- Daniel

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

This transmittal and any attachments may contain confidential, privileged or sensitive information
and is solely for the use of the intended recipient. If you are not the intended recipient,
you are hereby notified that you have received this transmittal and any attachments in error
and any review, dissemination, distribution or copying thereof is strictly prohibited. If
you have received this transmittal and any attachments in error please notify the sender and
immediately destroy the message and all its attachments. Any opinions herein expressed may
be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate
Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group ("Mizuho").
Mizuho accepts no responsibility for the accuracy or completeness of any information herein
E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered
U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking,
capital markets, and securities business in the United States) is electronically archived
and recorded and is subject to review and monitoring by and/or disclosure to persons other
than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory
personnel. Such communications may be produced to regulatory authorities or others with legal
rights to the information.
If you have any questions, or if you no longer wish to receive e-mail in accordance with Japanese
Act on Regulation of the Transmission of Specified Electronic Mail, please contact the sender
of this e-mail.
お問い合わせまたは特定電子メール法に 基づく送信停止のご要望等は、本電子メールの送信者にその旨ご連絡ください。

View raw message