Hi,
First of all I'm not sure about the any of the frameworks supporting MTOM/XOP.
IMHO if somebody wants to have MTOM with data binding, there will be issues with both these approaches.
In the first approach we are giving the StaxOMBuilder an pull parser. Given a pull parser even though it throws xop events, there won't be MIME parts for those references. This issue will be resolved if there is a way to keep a reference to the underlying stream.
In the first approach we are giving the StaxOMBuilder an pull parser. Given a pull parser even though it throws xop events, there won't be MIME parts for those references. This issue will be resolved if there is a way to keep a reference to the underlying stream.
In the second approach we are giving out a plain XMLStreamWriter. If we have any intentions of MTOM/XOP according to the current architecture we have to pass a OMOutput in to the serialize method. It is clear that these frameworks does not support XOP, byseeing that they take in XMLStreamWriters for the serialize. IMO Things will be much more difficult for MTOM/XOP in this approach.
Just my two cents. I'm still new to the Data binding concepts and some of my ideas may sound crazy. Pls bare with me.
BTW Chathura aiya, I'm Thilina, not Thilini ;-)...
Thanks & Regards,
~Thilina
On 10/29/05, Chathura Herath <[EMAIL PROTECTED]> wrote:
First approach looks much cleaner. I am bit fuzzy about how the second
approach would affect our MTOM architecture. I mean how can we be
aware of xop if we are not aware of the events.
Thilina, you wanna comment on that??
>
> 1. Getting pull parser from the data bound object, irrespective of which
> framework was used to data bound, and create an OMElement out of it and
> hangs that to the OM tree.
>
> DataBoundObject dbObj = // get the data bound object
> OMElement dbObjWrapper = new
> StaxOMBuilder(dataBoundObject.getPullParser()).getDocumentElement();
>
> // add this to body of wherever you want
> body.addChild(dbObjWrapper);
>
> 2. Giving the data bound object an XSR (XMLStreamWriter) and ask him to
> serialize himself
> DataBoundObject dbObj = // get the data bound object
> SpecialOMElement dbObjContainer = new SpecialOMElement(dbObj);
> dbObjContainer.serialize(xmlStreamWriter);
>
> (are there other approaches ? if so please comment)
>
--
Chathura Herath
http://www.bloglines.com/blog/chathurah
--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina
