Skip to Content
0
Former Member
Jan 13, 2012 at 08:56 AM

Receiving null when accessing the content of an attachment

106 Views

Hello Iu2019ve got a mail to soap scenario. I try to get the attachments of the mail to process them later. That for I am using a java. With the following code I get the attachments:

InputAttachments inputAttachments = transformationInput.getInputAttachments();

After that I get the contentIDs

Collection <String> strContentIds = inputAttachments.getAllContentIds(true);

And loop through them

for (String sContentId : strContentIds) {

u2026.

inputAttachments.getAttachment(sContentId).getContent(); // this is always null

u2026.

}

The problem is that I canu2019t access the content, it is always null. The contentIDs are correct: application/octet-stream;name="hello.xml" and application/octet-stream;name="hello.doc". In this scenario I want to extract the XML and work with it. Can someone tell me why the content is null?

Thanks and Regards,

AleksGj