My RESTEasy service does have a method using cookie parameters:
public interface SimpleService
{
public String test(@CookieParam("param") String param);
}
Now I am trying to use my SimpleService with RESTEasy client framework and it's proxy factory from within my Servlet. However, how can I "forward" the cookie parameters correctly? Right now, I need to manually loop through the request's cookies array and provide the cookie's value manually to the test(..) function call. Reading RESTEasy client framework documentation on http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html/RESTEasy_Client_Framework.html reads:
@CookieParam works the mirror opposite of its server-side counterpart and creates a cookie header to send to the server. You do not need to use @CookieParam if you allocate your own javax.ws.rs.core.Cookie object and pass it as a parameter to a client proxy method. The client framework understands that you are passing a cookie to the server so no extra metadata is needed.
So I am curious what this means for my case? How to properly use RESTEasy client framework & cookie parameters in my servlet?
thanks!