users@jaxb.java.net

Null pointer exception during unmarshalling

From: <oro7d3_at_netscape.net>
Date: Mon, 23 Feb 2004 15:01:11 -0500

I use JAXB along with SAAJ in JWSDP 1.3.

I use SAAJ for sending/receving SOAP message. And I use JAXB to build a JAVA object from the SOAP response.

When I use JAXB to unmarshall a SOAP Body element, I got the following null pointer exception.

I think this happesn because the getLocalName() of an attribute returns NULL. And this causes the following code to crash (inside the visit() of the DOMScanner).

    if(name.startsWith("xmlns:")) {
                receiver.startPrefixMapping( a.getLocalName(), a.getValue() );
                continue;
            }

java.lang.NullPointerException
    at org.xml.sax.helpers.NamespaceSupport.declarePrefix(Unknown Source)
    at com.sun.msv.verifier.AbstractVerifier.startPrefixMapping(AbstractVerifier.java:79)
    at com.sun.msv.verifier.VerifierFilter.startPrefixMapping(VerifierFilter.java:87)
    at org.iso_relax.verifier.impl.ForkContentHandler.startPrefixMapping(ForkContentHandler.java:65)
    at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:153)
    at com.sun.xml.bind.unmarshaller.DOMScanner.parse(DOMScanner.java:72)
    at mm7.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:166)
    at Main.parseResponseMessage(oldMain4.java:319)
    at Main.buildRequestMessage(oldMain4.java:178)
    at Main.main(oldMain4.java:70)

Have anyone else seen this also?
If yes, do you have any idea about how to resolve this?

Thank you.



__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net