You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2014/02/13 18:28:23 UTC

[jira] [Updated] (CXF-5562) value of @QueryParam/@PathParam Annotation inside @BeanParam Classes will be ignored

     [ https://issues.apache.org/jira/browse/CXF-5562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin updated CXF-5562:
----------------------------------

    Fix Version/s: 2.7.11
                   3.0.0-milestone2
         Assignee: Sergey Beryozkin

> value of @QueryParam/@PathParam Annotation inside @BeanParam Classes will be ignored
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-5562
>                 URL: https://issues.apache.org/jira/browse/CXF-5562
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.10
>         Environment: Oracle JDK 1.7.51
>            Reporter: Edgar Wentzlaff
>            Assignee: Sergey Beryozkin
>             Fix For: 3.0.0-milestone2, 2.7.11
>
>
> Value of @QueryParam/@PathParam Annotation inside @BeanParam Classes will be ignored by the JAXRS-Client.
> TestCase:
> {code:title=cxf-2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java}
> //...
>     @Test
>     public void testProxyBeanParam() throws Exception {
>         BookStore store = JAXRSClientFactory.create("http://localhost:" + PORT, BookStore.class);
>         BookStore.BookBean bean = new BookStore.BookBean();
>         bean.setId(100L);
>         bean.setId2(23L);
>                 
>         Book book = store.getBeanParamBook(bean);
>         assertEquals(123L, book.getId());
>         
>     }
> //...
> {code}
> Modified BookStore.BookBean inside Test Example
> {code:title=cxf-2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java}
> //...
>     public static class BookBean {
>         private long id;
>         private long id2;
>         private long id3;
>         public long getId() {
>             return id;
>         }
>         //@PathParam("id")
>         @PathParam("ID")
>         public void setId(long id) {
>             this.id = id;
>         }
>         
>         public long getId2() {
>             return id2;
>         }
>         //@QueryParam("id2")
>         @QueryParam("id_2")
>         public void setId2(long id2) {
>             this.id2 = id2;
>         }
>         
>         @Context
>         public void setUriInfo(UriInfo ui) {
>             String id3Value = ui.getQueryParameters().getFirst("id3");
>             if (id3Value != null) {
>                 this.id3 = Long.valueOf(id3Value);
>             }
>         }
>         public long getId3() {
>             return id3;
>         }
>         
>     }
> //...
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)