You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Mina R Waheeb <sy...@gmail.com> on 2010/07/22 19:10:14 UTC
Custom Data Binding
Hi,
I have some custom objects which I can't bind with any of the available
data binding providers! I'm trying to implement DataBinding which is
straight forward. But I still confused about how runtime works, do i have to
register my custom data binding with each factory like below, or there is a
way to register global binding provider which can create
MyCustomDataBinding?
factory.getServiceFactory().setDataBinding(new MyCustomDataBinding());
Best regards,
Mina R Waheeb
Re: Custom Data Binding
Posted by Mina R Waheeb <sy...@gmail.com>.
Thank you, I found it in
ReflectionServiceFactoryBean.createDefaultDataBinding() I will extend it to
make the binding configuration transparent and fall back to JAXBDataBinding!
Thanks again
On Thu, Jul 22, 2010 at 5:45 PM, Daniel Kulp <dk...@apache.org> wrote:
> On Thursday 22 July 2010 1:10:14 pm Mina R Waheeb wrote:
> > Hi,
> >
> > I have some custom objects which I can't bind with any of the
> available
> > data binding providers! I'm trying to implement DataBinding which is
> > straight forward. But I still confused about how runtime works, do i have
> > to register my custom data binding with each factory like below, or there
> > is a way to register global binding provider which can create
> > MyCustomDataBinding?
> >
> > factory.getServiceFactory().setDataBinding(new MyCustomDataBinding());
>
> Yea. You would need to do this.
>
> Alternatively, on the services, you can add:
> @DataBinding(MyCustomDataBinding.class)
> to let the runtime know that this service uses that databinding.
>
> Dan
>
>
> >
> > Best regards,
> > Mina R Waheeb
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>
Re: Custom Data Binding
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 22 July 2010 1:10:14 pm Mina R Waheeb wrote:
> Hi,
>
> I have some custom objects which I can't bind with any of the available
> data binding providers! I'm trying to implement DataBinding which is
> straight forward. But I still confused about how runtime works, do i have
> to register my custom data binding with each factory like below, or there
> is a way to register global binding provider which can create
> MyCustomDataBinding?
>
> factory.getServiceFactory().setDataBinding(new MyCustomDataBinding());
Yea. You would need to do this.
Alternatively, on the services, you can add:
@DataBinding(MyCustomDataBinding.class)
to let the runtime know that this service uses that databinding.
Dan
>
> Best regards,
> Mina R Waheeb
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog