axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Afkham Azeez <>
Subject [AXIS2] Issue with writing SOAPMessage to stream in SAAJ over DOOM
Date Thu, 22 Dec 2005 10:15:25 GMT
Hi Folks,
I'm curently implementing SAAJ over DOOM. I am facing the following issue;

In one of my unit tests, I have the following method:

public void testEnvelope() throws Exception {

        String msg =
                "<?xml version='1.0' encoding='UTF-8'?>\n" +
xmlns:soapenv=''\n" +
xmlns:xsd=''\n" +
xmlns:xsi=''>\n" +
                " <soapenv:Body>\n" +
                "    <echo><arg0>Hello</arg0></echo>" +
                " </soapenv:Body>\n" +

        MessageFactory factory = MessageFactory.newInstance();
        SOAPMessage message =
                factory.createMessage(new MimeHeaders(),
                                      new ByteArrayInputStream(msg.getBytes()));
        SOAPPart part = message.getSOAPPart();
        SOAPEnvelope envelope = part.getEnvelope();
        assertTrue(envelope != null);
        assertTrue(envelope.getBody() != null);

when I try to do message.writeTo(System.out) I get a
NullPointerException. See
for the stacktrace. However, if I define a default namespace or
namespace qualify the the <echo> and <arg0> elements, everything works
fine. Has anyone encountered a similar issue or Is this issue specific
to DOOM?

Thanks in Advance
Afkham Azeez

View raw message