Hi Angelo

Just back from holidays, I'll work with your patch asap,

Thanks, Sergey
On 05/06/12 15:11, Angelo zerr wrote:
Hi Sergey,

I have created a ticket https://issues.apache.org/jira/browse/CXF-4359
which fixes the problem with parameterized class (Page<A>, Page<B> will
populate JAXBContext with Page, A and B classes).

You will find in this ticket, explanation, SVN patch and src.zip which
contains JUnit.

Hope you will like it.

Regards Angelo

2012/6/4 Angelo zerr <[email protected] <mailto:[email protected]>>

    Hi Sergey,

    For your information, I have started my article which shows teh
    problem with parameterized type of Class (Page<A> +Page<B> should
    populaute JAXBContext with Page, A and B) and I have
    fixed this problem by modifying
    the AbstractJAXBProvider#getClassContext to use the genericType
    variable. I have created too a JUnit which test  that.

    As soon as my code will be clean, I will send you a patch.

    Regards Angelo


    2012/5/31 Angelo zerr <[email protected]
    <mailto:[email protected]>>

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

            Hi

            On 31/05/12 15:53, Angelo zerr wrote:



                2012/5/31 Sergey Beryozkin <[email protected]
                <mailto:[email protected]>
                <mailto:[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]>>
                <mailto:[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