I missed your earlier mail...sorry abt that.. 1) While using SWA we need to use OperationClient API at client side. > using MessageContext on service side to attach a attachment . Don't forget > to send messageId back as pay load so that you can extract actual > attachment client side.
Yes.. sending the ID is the recommended and most useful way.. But you can also send unreferenced attachments with SWA, without putting a MessageID in the body.. Then in the other side you can access them by getting an iterator out of attachment map. 2) Yes caching is supported while using SWA. > 3) if SOAP 1.2 version works with SWA ? I need to to try yet. It works with SOAP 1.2 too... thanks, Thilina regards > Yogesh > > > > > > [EMAIL PROTECTED] > > 10/08/2007 03:12 PM > Please respond to > [email protected] > > To > [email protected] cc > > Subject > Re: Axis2 SWA client communicating Axis2 MTOM service > > > > > > > > Hi > Thanks for insight > Sorry but two small question. > 1) For enabling SWA do i need to do any changes on service code or > Just changing axis conf file is ok > <parameter name="enableMTOM" locked="false">false</parameter> > <parameter name="enableSwA" locked="false">true</parameter> > > As I see in SWA sample I see usage of MessageContext Variable and usage of > OMelement variables/SenderClient at client side.In my case we really don't > use them. or it will be transparent to me if I use stub client. > > 2) Is use of SOAP 1.2 is ok ? in sample i see > > > 2) Caching is supported in SWA? > > > > regards > Yogesh > > *"Thilina Gunarathne" <[EMAIL PROTECTED]>* > > 10/08/2007 01:22 PM > Please respond to > [email protected] > > To > [email protected] cc > > Subject > Re: Axis2 SWA client communicating Axis2 MTOM service > > > > > > > > > > I have a web service running with AXIS2 with MTOM and I am trying to > > communicate it with Axis2 Client with SWA enabled ( Soap with > attachment). > > Is this possible to do ? > Nope.. Not if you are going to use the MTOM binding features, such as > automatic binding of bianry attachments to the XML tree... Things will > fail miserably if you r using data binding to generate the service > skeleton, as the message no longer conforms to the schema. > > You can access the attachments using the attachments API..But then you > are essentially doing SwA in the server side.. Also you won't be able > to use data binding. > > > > > Reason I need to do it as I am using ALSB 2.6 in between which does > not > > support MTOM. > > > > If yes Can any one tell me what is wrong in this SOAP response received > at > > client. It fails with ClassCastException at client side. I am having > > problem at client side . > Looking at the source you pasted below, you seems to be using data > binding together with a WSDL which has base64Binary in it. Your > response is SwA, which does not conforms to the data bounded schema. > Also the response message is broken, as it's header tells that it's > SwA, but the body has XOP:include. > > Mixing SwA with MTOM when data binding is used is not a good idea.. > > thanks, > Thilina > > >I tried to debug found It try to cast > > getBuilder() to > > org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder > > which is not in actually for my binaryData node. > > I am finding difficult why it try to use MTOMstax event I enabled only > SWA > > at client side. If you can make anything out of SOAP message what is > wrong > > let me know. > > > > My Stub setting > > EMISEPServiceStub serviceStub = new > > EMISEPServiceStub("http://localhost:8085/EMISProxyService"); > > > > serviceStub._getServiceClient().getOptions().setProperty( > > Constants.Configuration.ENABLE_MTOM, > > Constants.VALUE_FALSE); > > serviceStub._getServiceClient().getOptions().setProperty( > > > > Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE); > > > > > > > > SOAP message response > > > > HTTP/1.1 200 OK > > Date: Mon, 08 Oct 2007 14:32:13 GMT > > Transfer-Encoding: chunked > > Content-Type: multipart/related; type="application/soap+xml"; > > > > start="0.urn:uuid:[EMAIL PROTECTED]"; > > boundary=MIME_Boundary; charset=UTF-8 > > X-Powered-By: Servlet/2.4 JSP/2.0 > > > > 0670 > > --MIME_Boundary > > Content-ID: > > 0.urn:uuid:[EMAIL PROTECTED] > > Content-Type: application/soap+xml; charset=utf-8 > > Content-Transfer-Encoding: 8bit > > > > <?xml version='1.0' encoding='utf-8'?> > > <soapenv:Envelope > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > > <soapenv:Body> > > <ns1:getFileResponse > > xmlns:ns1="http://mizuho.com/emis/ep/paraminfo"> > > <ns1:method>getFile</ns1:method> > > <ns1:parameters> > > <ns1:FileDataInfo> > > > > <ns1:fileExtension>txt</ns1:fileExtension> > > > > <ns1:wildCardIndicator>N</ns1:wildCardIndicator> > > <ns1:fileName>test</ns1:fileName> > > <ns1:folderName>c:\TEMP</ns1:folderName> > > <ns1:scriptName>*</ns1:scriptName> > > <ns1:attachment> > > <ns1:size>1231</ns1:size> > > <ns1:checksum>1231</ns1:checksum> > > </ns1:attachment> > > </ns1:FileDataInfo> > > </ns1:parameters> > > <ns1:response> > > <ns1:attachment> > > <ns1:binaryNode> > > <xop:Include > > href="cid:1.urn:uuid:[EMAIL PROTECTED]" > > xmlns:xop="http://www.w3.org/2004/08/xop/include" /> > > </ns1:binaryNode> > > <ns1:size>121</ns1:size> > > <ns1:checksum>121</ns1:checksum> > > </ns1:attachment> > > > > <ns1:responseStatus>true</ns1:responseStatus> > > <ns1:hasAttachment>true</ns1:hasAttachment> > > </ns1:response> > > <ns1:EPInfo> > > <ns1:node> > > <ns1:name>sasdf</ns1:name> > > <ns1:id>12</ns1:id> > > </ns1:node> > > <ns1:system> > > <ns1:name>sasdf</ns1:name> > > <ns1:id>12</ns1:id> > > </ns1:system> > > </ns1:EPInfo> > > <ns1:currentInterface> > > <ns1:name>sdfa</ns1:name> > > <ns1:id>12</ns1:id> > > </ns1:currentInterface> > > </ns1:getFileResponse> > > </soapenv:Body> > > </soapenv:Envelope>--MIME_BoundaryContent-Type: > > text/plainContent-Transfer-Encoding: binaryContent-ID: > > > > <1.urn:uuid:[EMAIL PROTECTED]>Test > > Data created by 12:00 at 10/4/2007 to test attachment at > > ALSB0015--MIME_Boundary--0000 > > > > > > Exception stack trace. I am getting. > > java.lang.ClassCastException: > > org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder > > at > > com.mizuho.emis.ep.EMISEPServiceStub$Base64Binary$Factory.parse( > EMISEPServiceStub.java:2228) > > at > > com.mizuho.emis.ep.EMISEPServiceStub$Attachment$Factory.parse( > EMISEPServiceStub.java:6121) > > at > > com.mizuho.emis.ep.EMISEPServiceStub$ResponseData$Factory.parse( > EMISEPServiceStub.java:3595) > > at > > com.mizuho.emis.ep.EMISEPServiceStub$CommandInfo$Factory.parse( > EMISEPServiceStub.java:4698) > > at > > com.mizuho.emis.ep.EMISEPServiceStub$GetFileResponse$Factory.parse( > EMISEPServiceStub.java:4003) > > at > > com.mizuho.emis.ep.EMISEPServiceStub.fromOM(EMISEPServiceStub.java:1684) > > at > > com.mizuho.emis.ep.EMISEPServiceStub.getFile(EMISEPServiceStub.java > :1221) > > at > > com.mizuho.yogesh.WebServiceControlImpl.getFile( > WebServiceControlImpl.java:89) > > at > > com.mizuho.yogesh.NoWeblogic.webServiceControlGetFile(NoWeblogic.java > :80) > > at > > com.mizuho.yogesh.NoWeblogic.main(NoWeblogic.java:42) > > org.apache.axis2.AxisFault: > > org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder > > at > > org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) > > at > > com.mizuho.emis.ep.EMISEPServiceStub.fromOM(EMISEPServiceStub.java:1752) > > at > > com.mizuho.emis.ep.EMISEPServiceStub.getFile(EMISEPServiceStub.java > :1221) > > > > > > Thanks > > > > Regards > > Yogesh Dhake > > > > > ====================================================================================================== > > 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. > > > -- > Thilina Gunarathne - http://thilinag.blogspot.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Thilina Gunarathne - http://thilinag.blogspot.com
