[
https://issues.apache.org/jira/browse/WSCOMMONS-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rich Scheuerle resolved WSCOMMONS-170.
--------------------------------------
Resolution: Fixed
Committed revision 509707.
> OMSourcedElement forceExpand problem
> ------------------------------------
>
> Key: WSCOMMONS-170
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-170
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assigned To: Rich Scheuerle
> Attachments: patch.txt
>
>
> Here is the scenario:
> The tree looks like the following
> ...
> SOAP11Body (complete=true):
> |
> OMSourcedElement (complete=true)
> Contains OMDataSource
> Some code calls serialize (w/ caching) on the tree.
> OMSourcedElement.forceExpand() is invoked, and the OMSourcedElement attaches
> itself to an XMLStreamReader from OMDataSource.
> So far everything is okay.
> SOAP11Body (complete=true)
> |
> OMSourcedElement (complete=true)
> XMLStreamReader from
> OMDataSource
> Towards the end of OMSourceElement.forceExpand(), setComplete(false) is
> called. This is necessary to inform the OMSourcedElement
> that it is attached to the builder.
> Unfortunately, the setCompete(false) implementation propogates the "false"
> flag to its ancestors. This is not appropriate since the
> ancestors (SOAPBody) are already complete and its parser is already consumed.
> The following fix is required. In forceExpand,:
> Change:
> // set the builder for this element
> isParserSet = true;
> super.setBuilder(new StAXOMBuilder(getOMFactory(), reader, this));
> setComplete(false);
> To:
> // set the builder for this element
> isParserSet = true;
> super.setBuilder(new StAXOMBuilder(getOMFactory(), reader, this));
> done = false; // The parser is specific to OMSourcedElement. We
> don't want to propogate this flag up the tree, so don't use setComplete(false)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]