axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yogesh.Dh...@mizuhocbus.com
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();
        options.setTo(targetEPR);
        options.setProperty(Constants.Configuration.FORCE_MIME, 
Constants.VALUE_TRUE);
        serviceClient.setOptions(options);


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



Regards
Yogesh Dhake 




daniel.wehrle@email.de 
05/11/2010 11:40 AM
Please respond to
java-user@axis.apache.org


To
java-user@axis.apache.org
cc

Subject
MTOM Message is not Optimised






Hi,

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:

 
 
 
 
 
 
 
 
   </s:sequence>
 </s:complexType>
</s:element>

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

WormRaidStub.Add param4 = new WormRaidStub.Add();
param4.setCId(count);
param4.setCLength(len);
param4.setDId(docIds[i]);
param4.setWId(workId);
DataSource source = new BinaryDataSource(buffer);
param4.setFileData(new DataHandler(source));
param4.setMData(null);
stub.add(param4);

Soap message is like:
POST /iTernity/iTernity.asmx HTTP/1.1
Content-Type: multipart/related; 
boundary=MIMEBoundaryurn_uuid_65C1D2065536957F4C1273589767051; 
type="application/xop+xml"; 
start="<0.urn:uuid:65C1D2065536957F4C1273589767052@apache.org>"; 
start-info="application/soap+xml"; action="
http://www.iTernity.com/AddToWork"
User-Agent: Axis2
Host: 62.206.217.75
Transfer-Encoding: chunked

20f1
--MIMEBoundaryurn_uuid_65C1D2065536957F4C1273589767051
Content-Type: application/xop+xml; charset=UTF-8; 
type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:65C1D2065536957F4C1273589767052@apache.org>

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


<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
" soapenv:mustUnderstand="true">
<wsse:UsernameToken xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" wsu:Id="UsernameToken-122130810">
<wsse:Username>******</wsse:Username>
<wsse:Password Type="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
">*********</wsse:Password>
</wsse:UsernameToken>
<wsu:Timestamp xmlns:wsu="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
" wsu:Id="Timestamp-1120194637">
<wsu:Created>2010-05-11T14:56:06.875Z</wsu:Created>
<wsu:Expires>2010-05-11T15:01:06.875Z</wsu:Expires>
</wsu:Timestamp></wsse:Security>
<wsa:To>http://62.206.217.75/xxxxxx.asmx</wsa:To>
<wsa:ReplyTo><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo><wsa:MessageID>urn:uuid:65C1D2065536957F4C1273589766863</wsa:MessageID>
<wsa:Action>http://www.xxxxxx.com/Add</wsa:Action>
</soapenv:Header>

<ns1:Add xmlns:ns1="http://www.xxxxxx.com">
<ns1:wId>201005eb5d49158818b05043604204</ns1:workId>
<ns1:fileData>cmptP3M4Nnc/f3
[...]


What went wrong?
What can I do?

Thanks
-- Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org



======================================================================================================
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
contained.
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.
お問い合わせまたは特定電子メール法に 基づく送信停止のご要望等は、本電子メールの送信者にその旨ご連絡ください。



Mime
View raw message