I have an jax-rs annotated interface
public interface Store {
@Path("/apipath")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Token login(@BeanParam Header header,
@FormParam(value = "type") String type);
}
Token is a class annotated with jaxb annotations.
I want to use this interface as a client proxy.
Store s = new ClientResource(url).wrap(Store.class);
Token t = s.login(...);
The returned token is always null. No exception is thrown. If i use the same interface but as a jax-rs implementation i choose either cxf or resteasy the method returns non-null object with correct data.
im using org.restlet.ext.jaxrs 2.3.3, org.restlet.ext.jackson 2.3.3, org.restlet.ext.jaxb 2.3.1
The ClientResource
class and its wrap
method only supports native Restlet annotations (like @Get
, @Post
, ...). The JaxRsClientResource
does something similar but in the context of JAX-RS.
Hope it helps you, Thierry
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.