You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "???(Junhong Song)" <so...@gce.sejong.ac.kr> on 2002/11/18 10:39:52 UTC

How can I get JAXM SOAP with Attachement parts?

I received a SOAP with attachment message.
Attached data is XML document("text/xml" type). 
But when I try to get a attachment part by using below source code, I got a NullPointerException.

Iterator it = message.getAttachments();
AttachmentPart attachment = (AttachmentPart)it.next();
StreamSource content = (StreamSource)attachment.getContent(); <=content is not Null.
InputStream  inputstream = content.getInputStream(); <= inputstream is Null. 

StreamSource object is OK, but it doesn't return InputStreamObject.

Does anyone know what the problem is?

Thanks in advances.

Junhong.