You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Marwan Semaan <ma...@incomit.com> on 2003/03/12 08:55:11 UTC

createAttachmentPart returns NullpointerException

Hi All,
Is it a bug in Axis or a semantic error in my code when creating an
AttachmentPart, I appreciate if someone can help with that


message: org.apache.axis.Message@1950198
Error:null
java.lang.NullPointerException
        at
org.apache.axis.Message.createAttachmentPart(Message.java:611)

this is a peace of the code:
-----------------------------------------------------------------
// create a SOAP Message
javax.xml.soap.SOAPMessage message =
MessageFactory.newInstance().createMessage();
if (message == null) {
		System.out.println("message is null ushhh skit alltså");
	} else {
		System.out.println("message: "+message.toString());
	}
// create AttachmentPart
AttachmentPart ap = message.createAttachmentPart(); 
// Nullpointerexception on this line, message is defenitly not null
--------------------------------------------------------------------


best regards
Marwan