We’re using the @BeanParam annotation on a method parameter with CXF version
2.7.5 as shown below:
@Path("/books")
public interface BookService{
@PUT
@Path("/{id}")
Response updateBook(@BeanParam Book b);
}
public class Book {
private Long id;
@PathParam("id")
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
}
We are using the JAXRSClientFactory to create proxies for testing.
Unfortunately, the proxy client doesn't seem to be able to parse the
contents found inside the method bean argument.
We get a:
java.lang.IllegalArgumentException: Unresolved variables; only 0 value(s)
given for 1 unique variable(s)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.substituteVarargs(UriBuilderImpl.java:283)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.doBuildUriParts(UriBuilderImpl.java:120)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.doBuild(UriBuilderImpl.java:100)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.buildFromEncoded(UriBuilderImpl.java:228)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:165)
at com.sun.proxy.$Proxy112.updateBook(Unknown Source)
Any ideas what may be going on here? Help greatly appreciated.
--
View this message in context:
http://cxf.547215.n5.nabble.com/FW-BeanParam-with-JAXRSClientFactory-tp5733312p5733314.html
Sent from the cxf-user mailing list archive at Nabble.com.