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/07/26 19:59:06 UTC

[Axis2] databinding setting [Re: [Axis2]Databinding Notes

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 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