Hi,

I am trying to process attachments in my web service. I access it like this:

MessageContext msgCtx = context.getMessageContext();
Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgCtx.get(
                MessageContext.INBOUND_MESSAGE_ATTACHMENTS
);

InputStream is = null;

// assuming I always get a single attachment
for(Entry<String, DataHandler> attachmentEntry : attachments.entrySet()) {
                DataHandler value = attachmentEntry.getValue();
                is = value.getInputStream();
}

However, when I operate on the InputStream, I only get the first 2 KB of the 
attachment content.
Am I missing something? How can I access the full contents of the attachment?


Mit freundlichen Grüßen / With kind regards,
Julien Charon

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.cha...@avitech.aero<mailto:julien.cha...@avitech.aero>
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero<http://avitech.aero/>

This message may contain confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately by e-mail if you have received this e-mail by mistake and delete 
this e-mail from your system.

Reply via email to