I did a test and it seem it calls for
void serialize(javax.xml.stream.XMLStreamWriter xmlStreamWriter) throws
javax.xml.stream.XMLStreamException;
How can I make it to other one of methods?. what is the usage of those two
methods?
Amila.
On 8/24/07, Amila Suriarachchi <[EMAIL PROTECTED]> wrote:
>
> I have two questions regarding OMDataSource class
> 1. OMDataSource class has three serialize method. when each three methods
> called by the axiom when it uses with the Axis2.
>
> 2. two serailize methods has the following method signature.
> void serialize(java.io.OutputStream outputStream,
> org.apache.axiom.om.OMOutputFormat omOutputFormat) throws
> javax.xml.stream.XMLStreamException;
>
> void serialize(java.io.Writer writer,
> org.apache.axiom.om.OMOutputFormat omOutputFormat) throws
> javax.xml.stream.XMLStreamException;
>
> one method takes an java.io.OutputStream as an input parameter and throws
> a javax.xml.stream.XMLStreamException.
> should n't it throws an java.io.IOException since it takes the
> java.io.OutputStream
>
> this is the problem I have.
> In xml beans there is a method called save. which takes either a
> OutputStream or Writer and throws an IOException. So if I use that method
> here
> I have to catch the IOException and throws a XMLStreamException
>
> try {
> param.save(outputStream);
> } catch (IOException e) {
> new XMLStreamException("Problem with saving
> document",e);
> }
>
> thanks,
> Amila.
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
--
Amila Suriarachchi,
WSO2 Inc.