History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-530
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Austin Derck
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

Problem with Multipe Attachments

Created: 11/Jul/06 09:07 AM   Updated: 31/Jul/06 06:45 PM
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.2-RC

Time Tracking:
Not Specified

Environment: Fedora Core 4, Apache Tomcat 5.5.17


 Description  « Hide
Receiving the following error message when attempting to send multiple attachments:

org.codehaus.xfire.fault.XFireFault: Could not find the attachment cid:11526259123372-2022252745@http://www.w3.org/2001/XMLSchema

The attachments are simply being passed as two datahandlers (i.e. client.invoke("multipleAttachments", new Object[] {DataHandler, DataHandler})). It seems to me that it is recognizing at least one of them, but not the second. This is the same error message I was receiving prior to 1.1.1 when I could not send any attachments at all.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 12/Jul/06 07:47 AM
Ok, we'll check this out. Thanks.

Dan Diephouse - 16/Jul/06 11:17 AM
Seems we weren't saving a reference to every attachment in some cases. I fixed this in SVN. Thanks for the report. Hopefully builds will be out soon of 1.2. In the meantime you can find the fix in trunk in SVN.

Sean Doyle - 31/Jul/06 06:45 PM
Thanks - this works great in 1.2RC when MTOM is enabled.

However - when I turn off MTOM at the client side this error reappears. Perhaps I'm trying to do something stupid - but I may need to support third party clients that don't support MTOM. If I have the following in my wsdl:
<xsd:element minOccurs="0" name="data" nillable="true" type="xsd:base64Binary"/>

and I want a older SOAP client that doesn't support MTOM to send the data - should this work? What I did in one of my test clients was to remove this statement:
client.setProperty("mtom-enabled", "true");
or set it to
client.setProperty("mtom-enabled", "false");

In both cases I got:
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not find the attachment cid:115438880364635-1939214976@http://www.w3.org/2001/XMLSchema
org.codehaus.xfire.fault.XFireFault: Could not find the attachment cid:115438880364635-1939214976@http://www.w3.org/2001/XMLSchema
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:130)
at org.codehaus.xfire.client.Client.onReceive(Client.java:382)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:134)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:130)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)
at org.codehaus.xfire.client.Client.invoke(Client.java:335)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy7.put(Unknown Source)
at net.medcommons.modules.cxp.client.test.PUTTest.executePutCompoundDocument(PUTTest.java:177)
at net.medcommons.modules.cxp.client.test.PUTTest.testPutCompoundDocumentMTOMNoFilenames(PUTTest.java:64)

Should I make a separate WSDL for the non-MTOM clients where I replace the data type with 'string' - or can I use the same implementation on my server side but let the client decide if it's going to stream and/or do the XOP stuff?

Thanks!