axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Barlotta (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-3384) CXF and Axis2 interop: MTOM
Date Mon, 03 Dec 2007 17:45:43 GMT
CXF and Axis2 interop: MTOM
---------------------------

                 Key: AXIS2-3384
                 URL: https://issues.apache.org/jira/browse/AXIS2-3384
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.3
         Environment: Windows XP, JBoss 
            Reporter: Mike Barlotta


I am working on getting an Axis2 1.3 MTOM client to work with a Java service written using
CXF 2.0.3.
I have been trying to get an Axis2 client to receive an MTOM response back from my service,
having been able to successfully send an MTOM value in the request. 

Axis2 gives me this error on the SOAP response:
org.apache.axiom.om.OMException: org.apache.axiom.om.OMException: Referenced Attachment not
found in the MIME Message. ContentID:95d29856-612d-4f0e-955b-184c6e8a6c9e@http://cxf.apache.org/
 at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:228)
 at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:212)
 at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:390)
 at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerialize(OMTextImpl.java:200)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:772)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:772)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:772)
 at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:756)
 at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:345)
 at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:913)
 at java.lang.String.valueOf(String.java:2615)
 at java.lang.StringBuilder.append(StringBuilder.java:116)
 at com.bah.hello.HeyWorld_Axis2_Client.test_WS_HeyWorld(HeyWorld_Axis2_Client.java:69)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:164)
 at junit.framework.TestCase.runBare(TestCase.java:130)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:120)
 at junit.framework.TestSuite.runTest(TestSuite.java:230)
 at junit.framework.TestSuite.run(TestSuite.java:225)
 at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.apache.axiom.om.OMException: Referenced Attachment not found in the MIME Message.
ContentID:95d29856-612d-4f0e-955b-184c6e8a6c9e@http://cxf.apache.org/
 at org.apache.axiom.soap.impl.builder.MTOMStAXSOAPModelBuilder.getDataHandler(MTOMStAXSOAPModelBuilder.java:106)
 at org.apache.axiom.om.impl.llom.OMTextImpl.getDataHandler(OMTextImpl.java:324)
 at org.apache.axiom.om.impl.llom.OMTextImpl.getInputStream(OMTextImpl.java:338)
 at org.apache.axiom.om.impl.llom.OMTextImpl.getText(OMTextImpl.java:226)
 ... 32 more

This issue I am having also seems related to the error experienced with this posting and issue
(which appear to be fixed on CXF side):
http://www.nabble.com/URL-Encoded-ContentIDs-cause-interop-problems-with-Axis2-tf3639780.html#a10164676
http://issues.apache.org/jira/browse/CXF-596


Using TCPMON here is the partial SOAP response from CXF: 


<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><ns1:sayHeyResponse
xmlns:ns1="http://hello.bah.com/"><return><name>Hey Axis2 Client</name><binaryData><xop:Include
xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:b11231ac-cfd1-434f-8f87-29bbcbb2c71c@http%3A%2F%2Fcxf.apache.org%2F"/>
</binaryData></return></ns1:sayHeyResponse></soap:Body></soap:Envelope>
------=_Part_0_2698425.1196702522207
Content-Type: content/type
Content-Transfer-Encoding: binary
Content-ID: <b11231ac-cfd1-434f-8f87-29bbcbb2c71c@http%3A%2F%2Fcxf.apache.org%2F>


At first I thought the problem might be related to the "<" and ">" surrounding the content
id value but it seems that Axis2 also handles the content id in this manner in the request.
I also noticed that the content-id in the SOAP response header sent by CXF has the forward
slashes encoded, but the content-id as reported by Axis2 in the Exception is not. 

Axis2: 95d29856-612d-4f0e-955b-184c6e8a6c9e@http://cxf.apache.org/
CXF: <95d29856-612d-4f0e-955b-184c6e8a6c9e@http%3A%2F%2Fcxf.apache.org%2F>


It looks like Axis2 is searching incorrectly for the Content-ID value since an exact String
match would not occur due to the encoding, and after examining the source in a debugger found
that may be the case:

org.apache.axiom.attachments.Attachments class in the getDataHandler (line 270)
if (attachmentsMap.containsKey(blobContentID)) { (line 272)

blobContentId had the following value:

b11231ac-cfd1-434f-8f87-29bbcbb2c71c@http://cxf.apache.org/

attachmentsMap has the following value:

[b11231ac-cfd1-434f-8f87-29bbcbb2c71c@http%3A%2F%2Fcxf.apache.org%2F=javax.activation.DataHandler@1d709a5,
root.message@cxf.apache.org=javax.activation.DataHandler@14b84c7]

Thanks,

Mike 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message