Return-Path: Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: (qmail 13336 invoked from network); 14 May 2010 17:53:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 May 2010 17:53:08 -0000 Received: (qmail 49161 invoked by uid 500); 14 May 2010 17:53:06 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 49115 invoked by uid 500); 14 May 2010 17:53:06 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 49107 invoked by uid 99); 14 May 2010 17:53:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 17:53:06 +0000 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [65.51.41.51] (HELO mxmail1.mizuhocbus.com) (65.51.41.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 May 2010 17:52:59 +0000 Received: from hub.mizuhocbus.com ([203.12.8.116]) by mxmail1.mizuhocbus.com (8.14.1/8.14.1) with ESMTP id o4EHqSD3001777 for ; Fri, 14 May 2010 13:52:28 -0400 In-Reply-To: <361301514.100073.1273592270271.JavaMail.fmail@mwmweb058> To: java-user@axis.apache.org Subject: Re: MTOM Message is not Optimized MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006 Message-ID: From: Yogesh.Dhake@mizuhocbus.com Date: Fri, 14 May 2010 13:52:30 -0400 X-MIMETrack: Serialize by Router on NJLN001/MHCBUS(Release 7.0.2FP3|December 13, 2007) at 05/14/2010 01:52:32 PM, Serialize complete at 05/14/2010 01:52:32 PM Content-Type: multipart/alternative; boundary="=_alternative 006230C285257723_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 006230C285257723_= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hope below paragraph helps=20 When this property is set to true any SOAP envelope which contains=20 optimizable content (OMText nodes containing binary content with=20 optimizable flag "true") will be serialized as a MTOM optimized message.=20 Messages will not be packaged as MTOM if they did not contain any=20 optimizable content even though MTOM is enabled. But due considering the=20 policy assertions, there may be a policy saying, all the request should be= =20 optimized eventhough there are any optimized contents. To support this=20 phenomenon there is an entry called "forced mime" which has to be set as ServiceClient serviceClient =3D new ServiceClient (); Options options =3D new Options(); options.setTo(targetEPR); options.setProperty(Constants.Configuration.FORCE_MIME,=20 Constants.VALUE_TRUE); serviceClient.setOptions(options); Axis2 serializes all binary content nodes as Base64 encoded strings=20 regardless of they are qualified to be optimize or not, if Regards Yogesh Dhake=20 daniel.wehrle@email.de=20 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=20 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: =20 =20 =20 =20 =20 =20 =20 =20 I send 512 Kb or 1 MB by fileData but they are always send in base64=20 style... Calling code is like: WormRaidStub.Add param4 =3D new WormRaidStub.Add(); param4.setCId(count); param4.setCLength(len); param4.setDId(docIds[i]); param4.setWId(workId); DataSource source =3D 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;=20 boundary=3DMIMEBoundaryurn_uuid_65C1D2065536957F4C1273589767051;=20 type=3D"application/xop+xml";=20 start=3D"<0.urn:uuid:65C1D2065536957F4C1273589767052@apache.org>";=20 start-info=3D"application/soap+xml"; action=3D" 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=3DUTF-8;=20 type=3D"application/soap+xml" Content-Transfer-Encoding: binary Content-ID: <0.urn:uuid:65C1D2065536957F4C1273589767052@apache.org> ****** ********* 2010-05-11T14:56:06.875Z 2010-05-11T15:01:06.875Z http://62.206.217.75/xxxxxx.asmx http://schemas.xmlsoap.org/ws/2004/08/addressing/= role/anonymous urn:uuid:65C1D2065536957F4C1273589766863 http://www.xxxxxx.com/Add 201005eb5d49158818b05043604204 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D This transmittal and any attachments may contain confidential, privileged o= r 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 h= ave received this transmittal and any attachments in error and any review, = dissemination, distribution or copying thereof is strictly prohibited. If y= ou have received this transmittal and any attachments in error please notif= y the sender and immediately destroy the message and all its attachments. A= ny opinions herein expressed may be those of the author and not necessarily= of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securi= ties USA Inc. or any other affiliates of Mizuho Financial Group ("Mizuho").= Mizuho accepts no responsibility for the accuracy or completeness of any i= nformation herein contained. E-Mail received by or sent from officer of Mizuho Securities USA Inc. (whic= h is a registered U.S. broker-dealer and the entity through which Mizuho ge= nerally conducts its investment banking, capital markets, and securities bu= siness in the United States) is electronically archived and recorded and is= subject to review and monitoring by and/or disclosure to persons other tha= n the recipient, including (but not limited to) Mizuho Securities USA Inc. = supervisory personnel. Such communications may be produced to regulatory au= thorities or others with legal rights to the information. If you have any questions, or if you no longer wish to receive e-mail in ac= cordance with Japanese Act on Regulation of the Transmission of Specified E= lectronic Mail, please contact the sender of this e-mail. =E3=81=8A=E5=95=8F=E3=81=84=E5=90=88=E3=82=8F=E3=81=9B=E3=81=BE=E3=81=9F=E3= =81=AF=E7=89=B9=E5=AE=9A=E9=9B=BB=E5=AD=90=E3=83=A1=E3=83=BC=E3=83=AB=E6=B3= =95=E3=81=AB=E3=80=80=E5=9F=BA=E3=81=A5=E3=81=8F=E9=80=81=E4=BF=A1=E5=81=9C= =E6=AD=A2=E3=81=AE=E3=81=94=E8=A6=81=E6=9C=9B=E7=AD=89=E3=81=AF=E3=80=81=E6= =9C=AC=E9=9B=BB=E5=AD=90=E3=83=A1=E3=83=BC=E3=83=AB=E3=81=AE=E9=80=81=E4=BF= =A1=E8=80=85=E3=81=AB=E3=81=9D=E3=81=AE=E6=97=A8=E3=81=94=E9=80=A3=E7=B5=A1= =E3=81=8F=E3=81=A0=E3=81=95=E3=81=84=E3=80=82 --=_alternative 006230C285257723_= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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 serviceClie= nt =3D new ServiceClient ();
       Options options =3D new Options();
       options.setTo(targetEPR);
       options.setProperty(Constants.Configuration.FOR= CE_MIME, Constants.VALUE_TRUE);
       serviceClient.setOptions(options);


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



Regards
Yogesh Dhake



daniel.wehrle@email.d= e

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 =3D new WormRaidStub.Add();
param4.setCId(count);
param4.setCLength(len);
param4.setDId(docIds[i]);
param4.setWId(workId);
DataSource source =3D 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=3DMIMEBoundaryurn_uuid_65C1D20655= 36957F4C1273589767051; type=3D"application/xop+xml"; start=3D"<0.urn:uuid:65C1D2= 065536957F4C1273589767052@apache.org>"; start-info=3D"application/soap+xml"; action=3D"http://www.iT= ernity.com/AddToWork"
User-Agent: Axis2
Host: 62.206.217.75
Transfer-Encoding: chunked

20f1
--MIMEBoundaryurn_uuid_65C1D2065536957F4C1273589767051
Content-Type: application/xop+xml; charset=3DUTF-8; type=3D"applicatio= n/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:65C1D2065536957F4C1273589767052@apache.org>
<?xml version=3D'1.0' encoding=3D'UTF-8'?>


<wsse:Security xmlns:wsse=3D"http://docs.oasis-open.org/wss/2004/01= /oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand=3D"true">
<wsse:UsernameToken xmlns:wsu=3D"http://docs.oasis-open.org/wss/200= 4/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id=3D"UsernameToken-122130810">
<wsse:Username>******</wsse:Username>
<wsse:Password Type=3D"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=3D"http://docs.oasis-open.org/wss/2004/01/= oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id=3D"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:65C1D2065536957F4C1273589= 766863</wsa:MessageID>
<wsa:Action>http://www.xxxxxx.com/Add</wsa:Action>
</soapenv:Header>

<ns1:Add xmlns:ns1=3D"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 conta= in confidential, privileged or sensitive information and is solely for the = use of the intended recipient. If you are not the intended recipient, you a= re hereby notified that you have received this transmittal and any attachme= nts in error and any review, dissemination, distribution or copying thereof= is strictly prohibited. If you have received this transmittal and any atta= chments in error please notify the sender and immediately destroy the messa= ge and all its attachments. Any opinions herein expressed may be those of t= he author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corpor= ate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuh= o Financial Group ("Mizuho"). Mizuho accepts no responsibility fo= r 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 gene= rally conducts its investment banking, capital markets, and securities busi= ness in the United States) is electronically archived and recorded and is s= ubject to review and monitoring by and/or disclosure to persons other than = the recipient, including (but not limited to) Mizuho Securities USA Inc. su= pervisory personnel. Such communications may be produced to regulatory auth= orities or others with legal rights to the information.
If you have an= y 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.
=E3=81=8A=E5=95=8F=E3=81= =84=E5=90=88=E3=82=8F=E3=81=9B=E3=81=BE=E3=81=9F=E3=81=AF=E7=89=B9=E5=AE=9A= =E9=9B=BB=E5=AD=90=E3=83=A1=E3=83=BC=E3=83=AB=E6=B3=95=E3=81=AB=E3=80=80=E5= =9F=BA=E3=81=A5=E3=81=8F=E9=80=81=E4=BF=A1=E5=81=9C=E6=AD=A2=E3=81=AE=E3=81= =94=E8=A6=81=E6=9C=9B=E7=AD=89=E3=81=AF=E3=80=81=E6=9C=AC=E9=9B=BB=E5=AD=90= =E3=83=A1=E3=83=BC=E3=83=AB=E3=81=AE=E9=80=81=E4=BF=A1=E8=80=85=E3=81=AB=E3= =81=9D=E3=81=AE=E6=97=A8=E3=81=94=E9=80=A3=E7=B5=A1=E3=81=8F=E3=81=A0=E3=81= =95=E3=81=84=E3=80=82

--=_alternative 006230C285257723_=--