-
1. Re: Trouble with org.apache.servicemix.nmr.api.Message.addAttachment
njiang Nov 25, 2010 2:40 AM (in response to futuredan)nmr-camel component should copy the attachements between the camel message and nmr message.
What's the version of ESB are you using?
Can attach a simple test case to show that issue?
Willem
-
2. Re: Trouble with org.apache.servicemix.nmr.api.Message.addAttachment
futuredan Dec 6, 2010 6:39 PM (in response to njiang)I'm sorry it took so long to respond.
Attached is a project that shows the error.
The output during my run is the following:
18:35:41,522 | INFO | ndpoint-thread-1 | BinaryFileToAttachment | example.BinaryFileToAttachment 42 | 221 - fuseforum.example.attachtest - 0.0.1.SNAPSHOT | Attachment count for out is 1
18:35:46,889 | INFO | ndpoint-thread-1 | BinaryAttachmentReader | example.BinaryAttachmentReader 34 | 221 - fuseforum.example.attachtest - 0.0.1.SNAPSHOT | Message has no attachments
-
attachtest.zip 5.9 KB
-
-
3. Re: Trouble with org.apache.servicemix.nmr.api.Message.addAttachment
futuredan Dec 9, 2010 4:32 PM (in response to njiang)I am using FUSE 4.3.0-fuse-02-00
-
4. Re: Trouble with org.apache.servicemix.nmr.api.Message.addAttachment
njiang Dec 11, 2010 4:26 AM (in response to futuredan)I just have a change to look your test case. You are trying to put the message body directly as the attachment object in the BinaryFileToAttachment.
But camel message only take the attachment as DataHandler, so the attachment is not set into the camel message. Please change the File object into the DataHandler before you use it as the attachment.
-
5. Re: Trouble with org.apache.servicemix.nmr.api.Message.addAttachment
futuredan Dec 21, 2010 11:46 AM (in response to njiang)Thank you for that information.
I was not aware of the restriction on attachments.