You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Dennis Sosnoski (JIRA)" <ji...@apache.org> on 2007/03/29 11:26:25 UTC

[jira] Resolved: (AXIS2-1996) JiBXDataSource.getReader always throws NullPointerException

     [ https://issues.apache.org/jira/browse/AXIS2-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Sosnoski resolved AXIS2-1996.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2

Original issue fixed.

> JiBXDataSource.getReader always throws NullPointerException
> -----------------------------------------------------------
>
>                 Key: AXIS2-1996
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1996
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Peter Hornig
>         Assigned To: Dennis Sosnoski
>             Fix For: 1.2
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org