Hello Thilina, This OMOutput thing seems to be really cool but let me add a comment on this. In the OmOutput constructor you are passing a flag, probably the 'cache' flag. This flag caused a lot of stir at the summit and we decided that the best option is to have two methods. So going with that mindset, would it be possible to have a OMOutput(outStream) constructor that sets the correct flag inside the OMoutput ?
On 6/24/05, Thilina Gunarathne <[EMAIL PROTECTED]> wrote: > Hi all, > > We are using OMText (will be renamed to OMCharacters) class to handle both > optimised and un-optimised data. So this class may contain some binary data > as well. This will create a problem as the serialiser which writes using an > StAXWriter can not handle binary. > > So I will be introducing a new OMOutput class to handle all these. This will > basically wrap the StAXWriter for XML outputting and will handle binary > output of data. > > > Usage of OMOutput is as follows. One can instantiate a OMOutput by giving an > OutputStream and a boolean flag which will say whether the serialization is > MTOM optimised or not. In the use cases which do'nt use MTOM optimisation > it'll be like > OMOutput omOutput = new OMOutput(outStream,false); > In optimised case > OMOutput omOutput = new OMOutput(outstream,true); > > Then we can get the XMLStreamWriter by calling the methode > getXmlStreamWriter(); > eg; > XMLStreamWriter writer = omOutput.getXmlStreamWriter(); > > For backward compatibility we even include a constructor which takes in an > XMLStreamWriter. But the novice users are encourage not to use this, but to > use above mentioned constructors, which takes in OutputStream. > > So the typical XML outputting will be as follows. > > > OMOutput out = new OMOutput(outputStream,false); > envelope.serialize(out); > out.flush(); > > Thanks & Regards, > ~Thilina > > > "May the SourcE be with u" -- Ajith Ranabahu
