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
