Hi
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 ?
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 . 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.