JiBXDataSource.getReader always throws NullPointerException
-----------------------------------------------------------
Key: AXIS2-1996
URL: https://issues.apache.org/jira/browse/AXIS2-1996
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: databinding
Affects Versions: 1.1.1
Reporter: Peter Hornig
JiBXDataSource.getReader always throws a Null Pointer Exception due to
following Code
---------------------
public XMLStreamReader getReader() throws XMLStreamException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
serialize(bos, null);
return StAXUtils.createXMLStreamReader(new
ByteArrayInputStream(bos.toByteArray()));
}
/* (non-Javadoc)
* @see org.apache.axiom.om.OMDataSource#serialize(java.io.OutputStream,
org.apache.axiom.om.OMOutputFormat)
*/
public void serialize(OutputStream output, OMOutputFormat format) throws
XMLStreamException {
try {
IMarshallingContext ctx = bindingFactory.createMarshallingContext();
ctx.setOutput(output, format.getCharSetEncoding());
marshal(ctx);
} catch (JiBXException e) {
throw new XMLStreamException("Error in JiBX marshalling", e);
}
}
----------------------
serialize is called with NULL as a format and serialize uses
format.getCharSetEncoding());
---------------------------
The Null Pointer Exception happens when using axis2 with rampart
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]