Hi all,
It seems the current build() method in OMNodeImpl directly calls the
builder.next() repetitively till the tree is fully build for that
node. This behaviour works fine for all the cases except for the MTOM
optimised OMText objects. As you all aware AXIOM does not read the
actual binary when creating an OMText by the builder for a
XOP:Include. Actual binary attachment still remains in the stream till
the OMText.getDataHandler() is called. Because of this by simply
calling builder.next() from the OMNodeImpl will not build the whole OM
tree. This issue is captured in
https://issues.apache.org/jira/browse/WSCOMMONS-52.

My first proposal is to delegate the above OMNode.build() to all of
it's children. In this case We need by override this build() method in
the OMElementImpl and in the OMText(). OMText.build() will call the
getDataHandler() method when  doing a build for a binary OMText node.
In OMElementImpl we can use the getFirstChild(0 and getextOMSibling()
to implement this.

Further if we need more flexibility, we can introduce a buildAll()
method with above logic and keep the build() intact. So the build()
will build OM without binary parts. buildAll() will build the full OM
with binary parts.

Any suggestions??

Thanks,
~Thilina






--
"May the SourcE be with u"
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/
http://www.bloglines.com/blog/Thilina

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to