Rich Scheuerle
IBM Web Services
Apache Axis2 ([EMAIL PROTECTED])
512-838-5115  (IBM TL 678-5115)

"Amila Suriarachchi" <[EMAIL PROTECTED]> wrote on 08/09/2007
11:02:18 PM:

Thanks for the questions, Amila.
> hi,
> what type of object you expect in the
> public Object getObject();
>
> method in OMDataSourceExt interface.

The getObject() allows access to the object backed by the OMDataSourceExt.
See the new CharArrayDataSouce as an example.  It returns the char[].

>
> When building the OMElement currently OMDataSource calls to
> getReader() to get the XmlStreamReader and creates the
>
> OMElement from it. Can I directly send the OMElement (already build)
> using that interface?

Is this the scenario ?
  1) There is a OMSourcedElement backed by an OMDataSource.
  2) A query is made on the OMSourcedElement that causes a forceExpand.
(For example, getFirstChild() is called on the OMSourcedElement.)
  3) The OMSoucedElementImpl.forceExpand() method calls
OMDataSource.getREader() and uses it to build the OM sub-tree.

I believe your suggestion is:
  A) During forceExpand() invoke OMDataSourceExt.getObject().

  A1) If the returned Object is an OMElement, then
      * Add the attributes/namespace of the OMElement to the
OMSoucedElement.
      * Add the children of the OMElement to the OMSoucedElement.
      (This effectively eliminates the XMLStreamReader parse).

  A2) If the returned Object is not an OMElement, then fallback to the old
logic.

I think this would be a valuable follow-on to the original contribution.
Comments ?

>
> Amila.

>

> On 8/9/07, R J Scheuerle Jr < [EMAIL PROTECTED]> wrote:
> I have added some much needed upgrades to OMDataSource/OMSourcedElement.
>
> Here is the JIRA with the discussion and code/test patch.
> https://issues.apache.org/jira/browse/WSCOMMONS-232
>
> These changes will make it easier for users to access and plug in
> OMDataSource objects.
> It also provides a public interface for OMSourcedElement.
>
> The changes will not affect any existing code that relies on
> OMDataSource or OMSourcedElement.
>
> Please reply with your comments.  I will commit this code to Axiom on
Friday.
>
> Thanks,
>
> Rich Scheuerle
> IBM Web Services
> Apache Axis2 ([EMAIL PROTECTED])
> 512-838-5115  (IBM TL 678-5115)
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.

Reply via email to