Given that I have an interface that represents my RESET service using
public interface BookResource { @GET @Path("/book/isbn/{isbn}/") @Produces(value = { MediaType.APPLICATION_XML }) public ClientResponse<Book> getBookByIsbn(@PathParam("isbn") String isbn, @QueryParam("releaseStatus") String releaseStatus); }
How to create a proxy server for the actual implementation of the service, if I need to use Jersey as the JAX-RS platform of the / REST provider in my web application.
This is easy to do with RESTEasy / Spring integration and means that I can use my JAX-RS interface directly, without having to wrap it and the right boiler plate to complete the call.
Basically I am looking for a Jersey equivalent for the following: -
<bean id="bookResource" class="org.jboss.resteasy.client.spring.RestClientProxyFactoryBean"> <property name="serviceInterface" value="my.company.book.service.BookResource" /> <property name="baseUri" value="http://localhost:8181/books-service/" /> </bean>
I just spent the last hour searching on Google and keep returning to the standard Jersey client API, which seems to require a lot of boiler stove to achieve the same. Can someone point me in the right direction?
James source share