NullPointerException for empty uri on StaxUtils.writeStartElement
-----------------------------------------------------------------
Key: XFIRE-1117
URL: http://jira.codehaus.org/browse/XFIRE-1117
Project: XFire
Issue Type: Bug
Components: Core
Affects Versions: 1.2.6
Environment: Windows XP Pro
Reporter: Greg Slonim
Assignee: Dan Diephouse
Priority: Blocker
NullPointerException occurs when uri is null in
SimpleOutElement.getPrefix(String uri), in version 1.2.6 line 531
String prefix = mNsMapping.findPrefixByUri(uri); will call to
com.ctc.wstx.util.BijectiveNsMap and it will fail when there is no uri
An example of that will be soap fault, like this one:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
......
In all honesty, the com.ctc.wstx.util.BijectiveNsMap should check for null
before calling anything on that incoming string.
Thank you
The error occurs on soap:Fault element
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email