2012/5/31 Sergey Beryozkin <[email protected]>

> Hi
>
> On 31/05/12 15:53, Angelo zerr wrote:
>
>>
>>
>> 2012/5/31 Sergey Beryozkin <[email protected]
>> <mailto:[email protected]>>
>>
>>    Hi Angelo
>>
>>    On 31/05/12 15:38, Angelo zerr wrote:
>>
>>        Hi  Sergey,
>>
>>        Many thanks to do that.
>>
>>        I'm writing the next article which will explain how to serialize
>> teh
>>        Spring Data Structure (Page and Pageable) which are interfaces
>>        (and not
>>        Pojo) by using JAXB Adapter.
>>        I will show too that CXF 2.5 doesn't manage the JAXBContext
>>        correctly
>>        for Page<T> (ex: for Page<User>, JAXBContext is just populated
>>        with Page
>>        class and not with Page+User class).
>>
>>        It should be cool if next release of CXF will support that : CXF
>>        support
>>        for Collection<T>, List<T> etc but not for Page<T>, MyClass<T>
>>        etc...).
>>
>>    I was looking briefly into it and I could not figure out how to
>>    share a JAXBContext between Page<A>, Page<B>, etc. JAXBContext for
>>    Page<A> is will manage a pair of Page and A, but one can not reuse
>>    it for Page<B>. That said it is the same when no single JAXBContext
>>    is configured to be used and A and then B are processed, so I guess
>>    it's possible to do it...
>>
>>
>> I told me  that for Page<A>, Page<B>, JAXBContext is populated with
>> Page, A and B. Is it not possible to do that?
>>
>
> Do you mean that we have an interface such as
>
> public interface SomeInterface {
>  @GET
>  public Page<A> getPageA();
>
>  @GET
>  public Page<B> getPageB();
> }
>
> ?


Exactly! Spring Data
Page<http://static.springsource.org/spring-data/data-commons/docs/1.1.0.RELEASE/api/org/springframework/data/domain/Page.html>
interface
represents the result page of pagination (sub list, total elements etc...).
So you could have for instance:

public interface UserServive {

@GET
// returns paginated users
public Page<User> getUsers(Pageable<User> request);

@GET
// returns paginated roles
public Page<Role> getRoles(Pageable<Role> request);
}

In this case the provider, assuming it is configured to create a singe
> context, may be able to get Page, A & B into a single JAXBContext
>
Yes it's my problem:)

For the moment I have configurated JSONProvider

-------------------------------------------------
<bean id="jsonProvider" class=" org.apache.cxf.jaxrs.provider.JSONProvider">
<property name="extraClass">
 <list>
<value>fr.opensagres.domain.User</value>
</list>
 </property>
</bean>
-------------------------------------------------

But If CXF could manage that, it should be very cool.

Regards Angelo

>
> Cheers, Sergey
>
>
>> Regards Angelo
>>
>>
>>    Cheers, Sergey
>>
>>        regards Angelo
>>
>>        2012/5/31 Sergey Beryozkin <[email protected]
>>        <mailto:[email protected]>
>>        <mailto:[email protected] <mailto:[email protected]>>**>
>>
>>
>>
>>            Hi Angelo
>>
>>            On 31/05/12 14:55, Angelo zerr wrote:
>>
>>                Hi CXF Team,
>>
>>                Just for your information I'm writing articles about CXF
>>        DOSGi
>>                with JAX-RS
>>                in Eclipse RCP/RAP and Remoting with JAX-RS, Spring Data
>>        JPA and CXF
>>
>>          DOSGi<http://angelozerr.__word**__press.com/about/eclipse_____**
>> spring/eclipse_spring_dosgi/<http://word__press.com/about/eclipse_____spring/eclipse_spring_dosgi/><
>> http://wordpress.com/about/**eclipse___spring/eclipse_**spring_dosgi/<http://wordpress.com/about/eclipse___spring/eclipse_spring_dosgi/>
>> >
>>
>>        <http://angelozerr.wordpress._**_com/about/eclipse_spring/__**
>> eclipse_spring_dosgi/
>>
>>        <http://angelozerr.wordpress.**com/about/eclipse_spring/**
>> eclipse_spring_dosgi/<http://angelozerr.wordpress.com/about/eclipse_spring/eclipse_spring_dosgi/>
>> >>>
>>
>>                Those articles explain step by step how to install CXF
>> DOSGi
>>                (Multi Bundle
>>                Distribution) and use it on server and client side to
>> manage
>>                remoting in a
>>                Eclipse RCP/RAP or OSGi Bundle with Spring DM.
>>
>>                Any comments are welcome.
>>
>>                Hope you will like it.
>>
>>
>>            Many thanks for sharing it, I've updated this page:
>>
>>        https://cwiki.apache.org/____**confluence/display/CXF/DOSGi+_**
>> ___Presentations+and+Articles<https://cwiki.apache.org/____confluence/display/CXF/DOSGi+____Presentations+and+Articles>
>>        <https://cwiki.apache.org/__**confluence/display/CXF/DOSGi+_**
>> _Presentations+and+Articles<https://cwiki.apache.org/__confluence/display/CXF/DOSGi+__Presentations+and+Articles>
>> >
>>
>>
>>        <https://cwiki.apache.org/__**confluence/display/CXF/DOSGi+_**
>> _Presentations+and+Articles<https://cwiki.apache.org/__confluence/display/CXF/DOSGi+__Presentations+and+Articles>
>>        <https://cwiki.apache.org/**confluence/display/CXF/DOSGi+**
>> Presentations+and+Articles<https://cwiki.apache.org/confluence/display/CXF/DOSGi+Presentations+and+Articles>
>> >>
>>
>>            Cheers, Sergey
>>
>>                Regards Angelo
>>
>>
>>
>>
>>
>>    --
>>    Sergey Beryozkin
>>
>>    Talend Community Coders
>>    http://coders.talend.com/
>>
>>    Blog: http://sberyozkin.blogspot.com
>>
>>
>>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
>
> Blog: http://sberyozkin.blogspot.com
>

Reply via email to