[
https://issues.apache.org/jira/browse/CXF-5562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13900345#comment-13900345
]
Sergey Beryozkin edited comment on CXF-5562 at 2/13/14 1:52 PM:
----------------------------------------------------------------
Then simply use WebClient or new Client API and set the query options as needed;
Cheers, Sergey
was (Author: sergey_beryozkin):
Then simply use WebClient or new Cleint API and set the query options as needed;
Cheers, Sergey
> 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
>
> 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)