You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2005/04/05 04:46:49 UTC
XML views and flexible/efficient databindg [Re: [Axis2] Can OM with
differed building really be so effective in Axis2?
HaoRan Zheng wrote:
>Thanks to all. From your replies, I get a clearer understanding about
>"deferred binding". And I totally agree with the memory efficiency
>mentioned by Eran. However, I still have not seen the evident reasons
>that can enhance the round-trip performance. When a parsed SOAP body
>is not necessary in provider, "deferred parsing" is sure to be
>efficient. But if the provider needs a parsed one, I can not see the
>performance benefits.
>
>I think whether the body content will be parsed twice depends on the
>provider's implementation. Axis1.x does not have to parse the body
>twice if the provider can reuse the pre-parsed results. In fact, from
>the class "org.apache.axis.providers.java.RPCProvider" in Axis1.x, we
>can see the process well: XML stream ==(SAX API)==> buffered SAX
>events ==(replay with XXXDeserializer)==> Java objects. It parsed only
>once! And data binding was done at the same time.
>
>
that is why i think "buffered SAX events" should have been a lightweight
DOM from beginning (and that is what i hope AXIOM is now) - having AXIOM
should save one from "replay with XXXDeserializer" as SAAJ/DOM view
could be grafted directly on AXIOM XML tree without replay
as of data binding: i have less and less conviction that creating pure
Java objects (POJO) from XML is a good idea - XML is *not* POJO and if
you have only POJO you need to maintain (somehow automatic?) very
complicated mappings to reconstruct XML from POJO during serialization
(i think JiBX attempts to do that).
that is the reason why i think some kind of a next generation of
XmlBeans that allows to create any number of views (i would not call
then databinding) on top of existing Infoset subtree (backed by AXIOM
for example) would be optimal - you have a Java view (so it is easier to
access and manipulate XML) and that view is not disconnected from XML
infoset so you can modify XML infoset directly if needed (do XPath
whatever) and XML schemas validation rules can be integral part of Java
view to facilitate creation of "valid" XML
>So, from the "round-trip" view, "deferred binding" can not achieve
>remarkable performance enhancement mostly. Because mostly we need the
>parsed SOAP body in provider.
>
>
if you need SOAP Body parsed (for example in message level security or
WS-RM) then yes - but if you just have header you do not always need to
parse SOAP body.
alek
--
The best way to predict the future is to invent it - Alan Kay
Re: XML views and flexible/efficient databindg [Re: [Axis2] Can OM with differed building really be so effective in Axis2?
Posted by Venkat Reddy <vr...@gmail.com>.
On Apr 5, 2005 8:16 AM, Aleksander Slominski <as...@cs.indiana.edu> wrote:
>
> that is the reason why i think some kind of a next generation of
> XmlBeans that allows to create any number of views (i would not call
> then databinding) on top of existing Infoset subtree (backed by AXIOM
> for example) would be optimal - you have a Java view (so it is easier to
> access and manipulate XML) and that view is not disconnected from XML
> infoset so you can modify XML infoset directly if needed (do XPath
> whatever) and XML schemas validation rules can be integral part of Java
> view to facilitate creation of "valid" XML
>
Isn't this "java view" on infoset, nothing but DOM API for java?
- venkat
Re: XML views and flexible/efficient databindg [Re: [Axis2] Can OM
with differed building really be so effective in Axis2?
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Sanjiva Weerawarana wrote:
>"Aleksander Slominski" <as...@cs.indiana.edu> writes:
>
>
>>>Isn't this "java view" nothing but DOM API for java?
>>>
>>>
>>java view has java methods such as get/setTtile derived from XML schemas
>>or similiar data binding description - calling get/setTitle manipualtes
>>XML infoset.
>>
>>
>Axis2 allows you to implement such an implementation of data
>binding. It has its price (as does everything) but it'll work
>just fine.
>Are you volunteering to write such a beast? Cool!
>
>
too bad that XmlBeans does not allow such level flexibility even though
XML Schemas does - there is no reason why should have XML schemas
applied to all you document and not just to fragments and each fragment
may have actually multiple XML schemas (multiple views)
i already prototyped multiple XML views (XB1) and have it working
(XSUL1/2) though i am not sure it can work in AXIS2 as infrastructure as
it must support (multiple) views so my OM has support to discover list
of existing views for given XML Information Item and for casting XML
Infoset Items into a view (dynamic wrapping).
what i did is similar to XmlBeans but there can be 0..n views so when
working with XML Infoset directly there is no Java binding luggage
unless you need it - you create view only when you need it and for what
you need it to do - moreover multiple views are supported so multiple
handlers can create each own view on the same header or body. however i
do not XS generator so i write validation by hand ...
i discovered few interesting things about it (all code is now in XB1
which is part of XPP3/MXP1) and now i am experimenting with next
generation design that benefits from those lessons ofr cleaner code and
more flexibility.
thanks,
alek
--
The best way to predict the future is to invent it - Alan Kay
Re: XML views and flexible/efficient databindg [Re: [Axis2] Can OM
with differed building really be so effective in Axis2?
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Sanjiva Weerawarana wrote:
>"Aleksander Slominski" <as...@cs.indiana.edu> writes:
>
>
>>>Isn't this "java view" nothing but DOM API for java?
>>>
>>>
>>java view has java methods such as get/setTtile derived from XML schemas
>>or similiar data binding description - calling get/setTitle manipualtes
>>XML infoset.
>>
>>
>Axis2 allows you to implement such an implementation of data
>binding. It has its price (as does everything) but it'll work
>just fine.
>Are you volunteering to write such a beast? Cool!
>
>
too bad that XmlBeans does not allow such level flexibility even though
XML Schemas does - there is no reason why should have XML schemas
applied to all you document and not just to fragments and each fragment
may have actually multiple XML schemas (multiple views)
i already prototyped multiple XML views (XB1) and have it working
(XSUL1/2) though i am not sure it can work in AXIS2 as infrastructure as
it must support (multiple) views so my OM has support to discover list
of existing views for given XML Information Item and for casting XML
Infoset Items into a view (dynamic wrapping).
what i did is similar to XmlBeans but there can be 0..n views so when
working with XML Infoset directly there is no Java binding luggage
unless you need it - you create view only when you need it and for what
you need it to do - moreover multiple views are supported so multiple
handlers can create each own view on the same header or body. however i
do not XS generator so i write validation by hand ...
i discovered few interesting things about it (all code is now in XB1
which is part of XPP3/MXP1) and now i am experimenting with next
generation design that benefits from those lessons ofr cleaner code and
more flexibility.
thanks,
alek
--
The best way to predict the future is to invent it - Alan Kay
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
Re: XML views and flexible/efficient databindg [Re: [Axis2] Can OM with differed building really be so effective in Axis2?
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
"Aleksander Slominski" <as...@cs.indiana.edu> writes:
> >Isn't this "java view" nothing but DOM API for java?
> >
> >
> >
> java view has java methods such as get/setTtile derived from XML schemas
> or similiar data binding description - calling get/setTitle manipualtes
> XML infoset.
Axis2 allows you to implement such an implementation of data
binding. It has its price (as does everything) but it'll work
just fine.
Are you volunteering to write such a beast? Cool!
Sanjiva.
Re: XML views and flexible/efficient databindg [Re: [Axis2] Can OM
with differed building really be so effective in Axis2?
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Venkat Reddy wrote:
>On Apr 5, 2005 8:16 AM, Aleksander Slominski <as...@cs.indiana.edu> wrote:
>
>
>
>>that is the reason why i think some kind of a next generation of
>>XmlBeans that allows to create any number of views (i would not call
>>then databinding) on top of existing Infoset subtree (backed by AXIOM
>>for example) would be optimal - you have a Java view (so it is easier to
>>access and manipulate XML) and that view is not disconnected from XML
>>infoset so you can modify XML infoset directly if needed (do XPath
>>whatever) and XML schemas validation rules can be integral part of Java
>>view to facilitate creation of "valid" XML
>>
>>
>>
>
>Isn't this "java view" nothing but DOM API for java?
>
>
>
java view has java methods such as get/setTtile derived from XML schemas
or similiar data binding description - calling get/setTitle manipualtes
XML infoset.
alek
--
The best way to predict the future is to invent it - Alan Kay