sedj
Programmer
- Aug 6, 2002
- 5,610
Hi,
I am having some difficulty in retrieving valid data from SOAPMessage attachments - the SOAPMessage arrives successfully, and the data is uncorrupted, but the AttachmentPart.getContent() method seems to add bytes into the recieved attachment - corrupting the file.
For example, a zip file when sent is 500kb, but when recieved is 1000kb.
All is fine for text, image and msword files, but the ByteArrayInputStream which is returned by a call to AttachmentPart.getContent() when the MIME type is application/zip (or pdf) seems to be adding bytes.
I know it is due to the AttachmentPart.getContent() call because if I write the SOAPMessage out to a file, and split the attachments manually, the data is fine.
Any ideas why ?
Cheers
Ben
I am having some difficulty in retrieving valid data from SOAPMessage attachments - the SOAPMessage arrives successfully, and the data is uncorrupted, but the AttachmentPart.getContent() method seems to add bytes into the recieved attachment - corrupting the file.
For example, a zip file when sent is 500kb, but when recieved is 1000kb.
All is fine for text, image and msword files, but the ByteArrayInputStream which is returned by a call to AttachmentPart.getContent() when the MIME type is application/zip (or pdf) seems to be adding bytes.
I know it is due to the AttachmentPart.getContent() call because if I write the SOAPMessage out to a file, and split the attachments manually, the data is fine.
Any ideas why ?
Cheers
Ben