Re: Reusing CXF DataBindings in the JAX-RS implementation

2009-08-11 Thread Sergey Beryozkin
n get tricky >> for >> >> JAX-RS resources be represented well as WSDL-centric ones to meet >> >> different expectations of different bindings, something I found during >> >> the initial work. JAXRS resource methods might have parameters >> >> representing say queries, alongside with request bodies, etc. >> >> >> >> Perhaps the better option is for every DataBinding implementation is >> to >> >> have a method like >> >> >> >> setAllClasses(Set> classes) >> >> or >> >> setTypeInfo(Map, Type> info) >> >> >> >> which would represent an alternative option for initializing a >> >> databinding. Every CXF DataBinding would have to be updated slightly >> to >> >> use those classes instead of Service to gety initialized. >> >> >> >> JAXRS will create a required set/map and reflectively call such a >> >> method. This method might even make it into DataBinding interface if >> >> it's assumed that no users are directly interacting with DataBinding >> >> interfaces. >> >> >> >> Thoughts ? >> >> >> >> thanks, Sergey >> > >> > -- >> > Daniel Kulp >> > dk...@apache.org >> > http://www.dankulp.com/blog > > -- > Daniel Kulp > dk...@apache.org > http://www.dankulp.com/blog > > -- View this message in context: http://www.nabble.com/Reusing-CXF-DataBindings-in-the-JAX-RS-implementation-tp24716988p24917972.html Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Reusing CXF DataBindings in the JAX-RS implementation

2009-07-30 Thread Sergey Beryozkin
I'd prefer not to have a bunch of different init(..) methods on the interface itself that everyone HAS to implement. Ok, given this argument, I'm happy with having a single void initialize(Map properties) I guess I could've argued that perhaps only DataBindings shipped with CXF would implement

Re: Reusing CXF DataBindings in the JAX-RS implementation

2009-07-30 Thread Daniel Kulp
Basically, I think we should have: interface PropertiesInitializedDataBinding extends Databinding { void initialize(Map properties); } Then, we make our AbstractDataBinding implement that interface and add a method like: void initialize(Map properties) { Service svc = properties.get("...S

Re: Reusing CXF DataBindings in the JAX-RS implementation

2009-07-30 Thread Sergey Beryozkin
Hi I think what might make sense for a short term "binary compatible" type approach is to add a new interface like "ClassSetDataBinding" or something that defines the init(...) method that is needed for JAXRS. JAX-RS can then do instanceof on the databinding to see if it WILL work for it.

Re: Reusing CXF DataBindings in the JAX-RS implementation

2009-07-30 Thread Daniel Kulp
I think what might make sense for a short term "binary compatible" type approach is to add a new interface like "ClassSetDataBinding" or something that defines the init(...) method that is needed for JAXRS. JAX-RS can then do instanceof on the databinding to see if it WILL work for it. That

Reusing CXF DataBindings in the JAX-RS implementation

2009-07-29 Thread Sergey Beryozkin
Hi Until now it's not been possible to reuse existing CXF DataBinding implementations in CXF JAX-RS. For example, the JAX-RS impl provides its own versions of JAXB/Aegis/XMlBeans databindings by implementing JAX-RS MessageBodyProviders. Resolving this issue has been on the map for a while and