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 jayachandra <ja...@gmail.com> on 2005/07/26 13:28:32 UTC
[Axis2]Databinding Notes
Ajith et al,
In axis2 there is some databinding code present, but looks that only
codegen of wsdl module is using it and not any other module like core
etc. seems like using it. The existing typemapping framework is
registering only the xml type and java type names in the map, and with
just that much information it becomes tough to actually output a java
object out of a xml element and vice versa. Without marshaller and
unmarshallers registered for the types, can it be possible? If inside
the 'core' module code, we wish to data bind the parameters back and
forth (which would be a natural thing to do as we aim to support
operations other than those which accept and output just OMElements,
correct me if I'm wrong here!) how can that be done?
Thank you
Jaya
--
-- Jaya
Re: [Axis2]Databinding Notes
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Ajith Ranabahu wrote:
> The marshaller and unmarshaller are built into the generated objects.
> To be exact we use our builders and the provided XML stream reader
> from the generated objects to marshall and unmarshall objects.
I haven't dug into the Axis2 code yet (I'm planning to, following the
next release), but does this mean that your interface to marshalling
objects is based on them supplying an XML reader (meaning that it's a
pull interface from the Axis end)? If so, that's a major issue for most
data binding frameworks. Even the ones that unmarshal from pull parsers
generally expect to use push-style marshalling (meaning you tell the
framework to marshal the object and it executes a sequence of calls to
write it out).
I'd assumed you're using some sort of writer interface for the
marshalling, but the above statement has me wondering.
- Dennis
Re: [Axis2] databinding setting [Re: [Axis2]Databinding Notes
Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Aleksandr Slominski wrote:
> what about parts of message - if i want to databind only some specific
> headers? and to have one header databound with Castor, another with
> Xmlbeans and read SOAP:BODY as StAX event stream that i pipeline into
> yet another data binding if needed (for example if data is to be
> stores into database)?
I think that's a very good point. Allowing different data binding
frameworks at the code generation level will provide a limited sort of
flexibility, but it'd clearly be much better for the user if the Axis2
code generation can be made binding framework agnostic.
> i think there should be split between stub/skeleton generation (both
> are not needed with Java reflection, dynamic proxy, and/or byte
> weaving capabilities) and databiding code generaiton wich is
> orthogonal to stubs/skeletons IMHO.
With frameworks such as JiBX users will often want to reuse the data
classes from their server code on the client. This is especially true in
cases where an existing EJB architecture is being converted to web
services. If you force users to regenerate everything for the client
it's going to hurt Axis2 usability.
- Dennis
Re: [Axis2] databinding setting [Re: [Axis2]Databinding Notes
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
jayachandra wrote:
>Sounds reasonable to me for now.
>Even in Axis 1.x if user wishes to ser and deser a particular part of
>SOAP message as per a different data binding standard,
>
what about parts of message - if i want to databind only some specific
headers? and to have one header databound with Castor, another with
Xmlbeans and read SOAP:BODY as StAX event stream that i pipeline into
yet another data binding if needed (for example if data is to be stores
into database)?
> he must have
>the intelligentia to code the ser and deser factory for that data
>binding mechanism. Castor serializer and deserializer factories are
>some that got place inside axis code like that, if my understanding is
>correct.
>
>
XmlBeans and Castor can generate all code that is needed for databinding
(for doc/lit of course) so i do not see why this needs to be baked in
WSDL codegen.
if i already run databinding codegen (Castor, Xmlbeans) and generate
classes corresponding to schema types/elements why would i ever want to
do this again?
>Ajith! btw, if the user writes his own extension... should he
>necessarily add that one into axis2 code and recompile the whole thing
>and use the resulting jar, or can he 'plug' that one through some
>config XML file or command line option during code generation? The
>later feature if present, would be very nice.
>
>
i think there should be split between stub/skeleton generation (both are
not needed with Java reflection, dynamic proxy, and/or byte weaving
capabilities) and databiding code generaiton wich is orthogonal to
stubs/skeletons IMHO.
thanks,
alek
>Thank you
>Jayachandra
>
>On 7/27/05, Ajith Ranabahu <aj...@gmail.com> wrote:
>
>
>>Hi Alek,
>>The idea in having pluggable data binding is not making it pluggable after
>>code generation. Our view of 'pluggability' is at the code generation level.
>>i.e. if the user needs his own data binding he has to engage that extension
>>at the code generation stage to have the required code generated. Once the
>>code is generated (say with XMLBeans) it stays the same and cannot be
>>changed.
>>If the user needs to have different data binding components at different
>>parts of the SOAP Message he will have to have a highly customized codegen
>>extension to do that.
>>
>>
>>On 7/26/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
>>
>>
>>>if databinding selection happens during code generation how user can
>>>plugin their own databinding?
>>>
>>>and in particular what about case when user wants to apply different
>>>databinding for different parts of SOAP/XML message?
>>>
>>>thanks,
>>>
>>>alek
>>>
>>>
>>>
>>>
>>
>>--
>>Ajith Ranabahu
>>
>>
>
>
>
>
--
The best way to predict the future is to invent it - Alan Kay
Re: [Axis2] databinding setting [Re: [Axis2]Databinding Notes
Posted by jayachandra <ja...@gmail.com>.
Sounds reasonable to me for now.
Even in Axis 1.x if user wishes to ser and deser a particular part of
SOAP message as per a different data binding standard, he must have
the intelligentia to code the ser and deser factory for that data
binding mechanism. Castor serializer and deserializer factories are
some that got place inside axis code like that, if my understanding is
correct.
Ajith! btw, if the user writes his own extension... should he
necessarily add that one into axis2 code and recompile the whole thing
and use the resulting jar, or can he 'plug' that one through some
config XML file or command line option during code generation? The
later feature if present, would be very nice.
Thank you
Jayachandra
On 7/27/05, Ajith Ranabahu <aj...@gmail.com> wrote:
> Hi Alek,
> The idea in having pluggable data binding is not making it pluggable after
> code generation. Our view of 'pluggability' is at the code generation level.
> i.e. if the user needs his own data binding he has to engage that extension
> at the code generation stage to have the required code generated. Once the
> code is generated (say with XMLBeans) it stays the same and cannot be
> changed.
> If the user needs to have different data binding components at different
> parts of the SOAP Message he will have to have a highly customized codegen
> extension to do that.
>
>
> On 7/26/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
> > if databinding selection happens during code generation how user can
> > plugin their own databinding?
> >
> > and in particular what about case when user wants to apply different
> > databinding for different parts of SOAP/XML message?
> >
> > thanks,
> >
> > alek
> >
> >
>
>
>
> --
> Ajith Ranabahu
--
-- Jaya
Re: [Axis2] databinding setting [Re: [Axis2]Databinding Notes
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Alek,
The idea in having pluggable data binding is not making it pluggable after
code generation. Our view of 'pluggability' is at the code generation level.
i.e. if the user needs his own data binding he has to engage that extension
at the code generation stage to have the required code generated. Once the
code is generated (say with XMLBeans) it stays the same and cannot be
changed.
If the user needs to have different data binding components at different
parts of the SOAP Message he will have to have a highly customized codegen
extension to do that.
On 7/26/05, Aleksander Slominski <as...@cs.indiana.edu> wrote:
>
> if databinding selection happens during code generation how user can
> plugin their own databinding?
>
> and in particular what about case when user wants to apply different
> databinding for different parts of SOAP/XML message?
>
> thanks,
>
> alek
>
>
--
Ajith Ranabahu
[Axis2] databinding setting [Re: [Axis2]Databinding Notes
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
if databinding selection happens during code generation how user can
plugin their own databinding?
and in particular what about case when user wants to apply different
databinding for different parts of SOAP/XML message?
thanks,
alek
Ajith Ranabahu wrote:
> Hi Jaya,
> Well. You are quite right. Right now core has no such dependancy on
> the databinding. The idea is to incorporate databound objects when
> skeletons are code generated. Our plan is to generate the databound
> objects, skeletons and the relevant message receiver when skeletons
> are generated.
> The marshaller and unmarshaller are built into the generated objects.
> To be exact we use our builders and the provided XML stream reader
> from the generated objects to marshall and unmarshall objects.
>
> On 7/26/05, *jayachandra* <jayachandra@gmail.com
> <ma...@gmail.com> > wrote:
>
> Ajith et al,
>
> In axis2 there is some databinding code present, but looks that only
> codegen of wsdl module is using it and not any other module like core
> etc. seems like using it. The existing typemapping framework is
> registering only the xml type and java type names in the map, and with
> just that much information it becomes tough to actually output a java
> object out of a xml element and vice versa. Without marshaller and
> unmarshallers registered for the types, can it be possible? If inside
> the 'core' module code, we wish to data bind the parameters back and
> forth (which would be a natural thing to do as we aim to support
> operations other than those which accept and output just OMElements,
> correct me if I'm wrong here!) how can that be done?
>
> Thank you
> Jaya
> --
> -- Jaya
>
>
>
>
> --
> Ajith Ranabahu
--
The best way to predict the future is to invent it - Alan Kay
Re: [Axis2]Databinding Notes
Posted by Venkat Reddy <vr...@gmail.com>.
IIRC, it should go into MessageReceiver which is opposite of stub on
client-side.
- venkat
On 7/26/05, jayachandra <ja...@gmail.com> wrote:
> Okay got it!
>
> One small confusion, will the actual ser/deser work go into Message
> Receiver (I hope not) or the skeleton on server side.
> If I got your idea right, on the client side this ser and deser
> functionality should go into the generated stub object, isn't it?
>
> Best regards
> Jayachandra
>
> On 7/26/05, Chathura Herath <ch...@opensource.lk> wrote:
> >
> >
> > Yup. The data binding is interfaced to the engine through the Message
> > receiver that will also be generated. Serialization and deserialization is
> > handled by the data binding framework.
> >
> >
> >
> > Chathura
> >
> >
> >
> >
> >
> > ________________________________
> >
> >
> > From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]
> > Sent: Tuesday, July 26, 2005 2:05 PM
> > To: axis-dev@ws.apache.org; jayachandra
> > Subject: Re: [Axis2]Databinding Notes
> >
> >
> >
> >
> > Hi Jaya,
> > Well. You are quite right. Right now core has no such dependancy on the
> > databinding. The idea is to incorporate databound objects when skeletons are
> > code generated. Our plan is to generate the databound objects, skeletons and
> > the relevant message receiver when skeletons are generated.
> > The marshaller and unmarshaller are built into the generated objects. To be
> > exact we use our builders and the provided XML stream reader from the
> > generated objects to marshall and unmarshall objects.
> >
> >
> > On 7/26/05, jayachandra <jayachandra@gmail.com > wrote:
> >
> > Ajith et al,
> >
> > In axis2 there is some databinding code present, but looks that only
> > codegen of wsdl module is using it and not any other module like core
> > etc. seems like using it. The existing typemapping framework is
> > registering only the xml type and java type names in the map, and with
> > just that much information it becomes tough to actually output a java
> > object out of a xml element and vice versa. Without marshaller and
> > unmarshallers registered for the types, can it be possible? If inside
> > the 'core' module code, we wish to data bind the parameters back and
> > forth (which would be a natural thing to do as we aim to support
> > operations other than those which accept and output just OMElements,
> > correct me if I'm wrong here!) how can that be done?
> >
> > Thank you
> > Jaya
> > --
> > -- Jaya
> >
> >
> >
> >
> > --
> > Ajith Ranabahu
>
>
> --
> -- Jaya
>
Re: [Axis2]Databinding Notes
Posted by jayachandra <ja...@gmail.com>.
Okay got it!
One small confusion, will the actual ser/deser work go into Message
Receiver (I hope not) or the skeleton on server side.
If I got your idea right, on the client side this ser and deser
functionality should go into the generated stub object, isn't it?
Best regards
Jayachandra
On 7/26/05, Chathura Herath <ch...@opensource.lk> wrote:
>
>
> Yup. The data binding is interfaced to the engine through the Message
> receiver that will also be generated. Serialization and deserialization is
> handled by the data binding framework.
>
>
>
> Chathura
>
>
>
>
>
> ________________________________
>
>
> From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]
> Sent: Tuesday, July 26, 2005 2:05 PM
> To: axis-dev@ws.apache.org; jayachandra
> Subject: Re: [Axis2]Databinding Notes
>
>
>
>
> Hi Jaya,
> Well. You are quite right. Right now core has no such dependancy on the
> databinding. The idea is to incorporate databound objects when skeletons are
> code generated. Our plan is to generate the databound objects, skeletons and
> the relevant message receiver when skeletons are generated.
> The marshaller and unmarshaller are built into the generated objects. To be
> exact we use our builders and the provided XML stream reader from the
> generated objects to marshall and unmarshall objects.
>
>
> On 7/26/05, jayachandra <jayachandra@gmail.com > wrote:
>
> Ajith et al,
>
> In axis2 there is some databinding code present, but looks that only
> codegen of wsdl module is using it and not any other module like core
> etc. seems like using it. The existing typemapping framework is
> registering only the xml type and java type names in the map, and with
> just that much information it becomes tough to actually output a java
> object out of a xml element and vice versa. Without marshaller and
> unmarshallers registered for the types, can it be possible? If inside
> the 'core' module code, we wish to data bind the parameters back and
> forth (which would be a natural thing to do as we aim to support
> operations other than those which accept and output just OMElements,
> correct me if I'm wrong here!) how can that be done?
>
> Thank you
> Jaya
> --
> -- Jaya
>
>
>
>
> --
> Ajith Ranabahu
--
-- Jaya
Re: [Axis2]Databinding Notes
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Venkat,
IMHO if we are to have an object[] input then we have to have some kind of
databinding inside. Since we don't have our own databinding yet, such a
client is not possible (yet). Certainly it is a wish but unfortunaltely I
don't see it coming in the near future.
Hmmm.. RPC encoding... We are looking for a strategy but not yet decided. I
mean the main problem in doing that is that our WOM (WSDL Object Model) is
WSDL 2.0 based which does not have a messages section. In WSDL 2.0,
operations have a direct link to a schema element (see
http://www.w3.org/TR/2005/WD-wsdl20-primer-20050510/#basics). The conversion
for doclit is straight forward but not so for the RPC-encoded case. Chathura
is working on that.
On 7/27/05, Venkat Reddy <vr...@gmail.com> wrote:
>
> Ajith and Chathura,
>
> If i want to write a DII kind of client which doesn't use any static
> stubs, then isn't it too much work to write the databinding code on my
> own? I was expecting a version of Call.invoke() which can take
> Object[]. Is this not in our wish list? What's our approach to support
> RPC encoding?
>
> - venkat
>
>
> On 7/26/05, Chathura Herath <ch...@opensource.lk> wrote:
> >
> >
> >
> > Yup. The data binding is interfaced to the engine through the Message
> > receiver that will also be generated. Serialization and deserialization
> is
> > handled by the data binding framework.
> >
> >
> >
> > Chathura
> >
> >
> >
> >
> >
> >
> > ________________________________
> >
> >
> > From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]
> > Sent: Tuesday, July 26, 2005 2:05 PM
> > To: axis-dev@ws.apache.org; jayachandra
> > Subject: Re: [Axis2]Databinding Notes
> >
> >
> >
> >
> > Hi Jaya,
> > Well. You are quite right. Right now core has no such dependancy on the
> > databinding. The idea is to incorporate databound objects when skeletons
> are
> > code generated. Our plan is to generate the databound objects, skeletons
> and
> > the relevant message receiver when skeletons are generated.
> > The marshaller and unmarshaller are built into the generated objects. To
> be
> > exact we use our builders and the provided XML stream reader from the
> > generated objects to marshall and unmarshall objects.
> >
> >
> > On 7/26/05, jayachandra <jayachandra@gmail.com > wrote:
> >
> > Ajith et al,
> >
> > In axis2 there is some databinding code present, but looks that only
> > codegen of wsdl module is using it and not any other module like core
> > etc. seems like using it. The existing typemapping framework is
> > registering only the xml type and java type names in the map, and with
> > just that much information it becomes tough to actually output a java
> > object out of a xml element and vice versa. Without marshaller and
> > unmarshallers registered for the types, can it be possible? If inside
> > the 'core' module code, we wish to data bind the parameters back and
> > forth (which would be a natural thing to do as we aim to support
> > operations other than those which accept and output just OMElements,
> > correct me if I'm wrong here!) how can that be done?
> >
> > Thank you
> > Jaya
> > --
> > -- Jaya
> >
> >
> >
> >
> > --
> > Ajith Ranabahu
>
--
Ajith Ranabahu
Re: [Axis2]Databinding Notes
Posted by Venkat Reddy <vr...@gmail.com>.
Ajith and Chathura,
If i want to write a DII kind of client which doesn't use any static
stubs, then isn't it too much work to write the databinding code on my
own? I was expecting a version of Call.invoke() which can take
Object[]. Is this not in our wish list? What's our approach to support
RPC encoding?
- venkat
On 7/26/05, Chathura Herath <ch...@opensource.lk> wrote:
>
>
>
> Yup. The data binding is interfaced to the engine through the Message
> receiver that will also be generated. Serialization and deserialization is
> handled by the data binding framework.
>
>
>
> Chathura
>
>
>
>
>
>
> ________________________________
>
>
> From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]
> Sent: Tuesday, July 26, 2005 2:05 PM
> To: axis-dev@ws.apache.org; jayachandra
> Subject: Re: [Axis2]Databinding Notes
>
>
>
>
> Hi Jaya,
> Well. You are quite right. Right now core has no such dependancy on the
> databinding. The idea is to incorporate databound objects when skeletons are
> code generated. Our plan is to generate the databound objects, skeletons and
> the relevant message receiver when skeletons are generated.
> The marshaller and unmarshaller are built into the generated objects. To be
> exact we use our builders and the provided XML stream reader from the
> generated objects to marshall and unmarshall objects.
>
>
> On 7/26/05, jayachandra <jayachandra@gmail.com > wrote:
>
> Ajith et al,
>
> In axis2 there is some databinding code present, but looks that only
> codegen of wsdl module is using it and not any other module like core
> etc. seems like using it. The existing typemapping framework is
> registering only the xml type and java type names in the map, and with
> just that much information it becomes tough to actually output a java
> object out of a xml element and vice versa. Without marshaller and
> unmarshallers registered for the types, can it be possible? If inside
> the 'core' module code, we wish to data bind the parameters back and
> forth (which would be a natural thing to do as we aim to support
> operations other than those which accept and output just OMElements,
> correct me if I'm wrong here!) how can that be done?
>
> Thank you
> Jaya
> --
> -- Jaya
>
>
>
>
> --
> Ajith Ranabahu
RE: [Axis2]Databinding Notes
Posted by Chathura Herath <ch...@opensource.lk>.
Yup. The data binding is interfaced to the engine through the Message
receiver that will also be generated. Serialization and deserialization is
handled by the data binding framework.
Chathura
_____
From: Ajith Ranabahu [mailto:ajith.ranabahu@gmail.com]
Sent: Tuesday, July 26, 2005 2:05 PM
To: axis-dev@ws.apache.org; jayachandra
Subject: Re: [Axis2]Databinding Notes
Hi Jaya,
Well. You are quite right. Right now core has no such dependancy on the
databinding. The idea is to incorporate databound objects when skeletons are
code generated. Our plan is to generate the databound objects, skeletons and
the relevant message receiver when skeletons are generated.
The marshaller and unmarshaller are built into the generated objects. To be
exact we use our builders and the provided XML stream reader from the
generated objects to marshall and unmarshall objects.
On 7/26/05, jayachandra <jayachandra@gmail.com > wrote:
Ajith et al,
In axis2 there is some databinding code present, but looks that only
codegen of wsdl module is using it and not any other module like core
etc. seems like using it. The existing typemapping framework is
registering only the xml type and java type names in the map, and with
just that much information it becomes tough to actually output a java
object out of a xml element and vice versa. Without marshaller and
unmarshallers registered for the types, can it be possible? If inside
the 'core' module code, we wish to data bind the parameters back and
forth (which would be a natural thing to do as we aim to support
operations other than those which accept and output just OMElements,
correct me if I'm wrong here!) how can that be done?
Thank you
Jaya
--
-- Jaya
--
Ajith Ranabahu
Re: [Axis2]Databinding Notes
Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi Jaya,
Well. You are quite right. Right now core has no such dependancy on the
databinding. The idea is to incorporate databound objects when skeletons are
code generated. Our plan is to generate the databound objects, skeletons and
the relevant message receiver when skeletons are generated.
The marshaller and unmarshaller are built into the generated objects. To be
exact we use our builders and the provided XML stream reader from the
generated objects to marshall and unmarshall objects.
On 7/26/05, jayachandra <ja...@gmail.com> wrote:
>
> Ajith et al,
>
> In axis2 there is some databinding code present, but looks that only
> codegen of wsdl module is using it and not any other module like core
> etc. seems like using it. The existing typemapping framework is
> registering only the xml type and java type names in the map, and with
> just that much information it becomes tough to actually output a java
> object out of a xml element and vice versa. Without marshaller and
> unmarshallers registered for the types, can it be possible? If inside
> the 'core' module code, we wish to data bind the parameters back and
> forth (which would be a natural thing to do as we aim to support
> operations other than those which accept and output just OMElements,
> correct me if I'm wrong here!) how can that be done?
>
> Thank you
> Jaya
> --
> -- Jaya
>
--
Ajith Ranabahu