ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Grahn (JIRA)" <>
Subject [jira] [Created] (AXIOM-442) Null pointer exception in MTOM validation
Date Mon, 12 Nov 2012 18:05:12 GMT
James Grahn created AXIOM-442:

             Summary: Null pointer exception in MTOM validation
                 Key: AXIOM-442
             Project: Axiom
          Issue Type: Bug
    Affects Versions: 1.2.12
            Reporter: James Grahn

As part of an Axis2 workflow, my code validates incoming messages against schemas.   This
seems to work in all cases except when the incoming message contains an MTOM attachment.

The code constructs a Source object for the part of the message to be validated, then calls
the "validate" method on a properly constructed javax.xml.validation.Validator object:
Source validateMe = new OMSource(messagePart);

The error generated looks like this:
 at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Unknown Source)
 at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
 at javax.xml.validation.Validator.validate(Unknown Source)


By the time it reaches my handler, I'm not fully certain what should be in the MTOM attachment
element should contain, as it's reasonable to assume that the attachment has been extracted
by then.   A NullPointerException doesn't seem appropriate, however.

A logging statement does show the attachment inline, encoded in Base64 (though I believe all
incoming MTOM is represented that way if the envelope is printed for a log).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message