Re: [Resteasy-users] Automatic Cookie Passing

2012-11-22 Thread Saravanabavagugan Vengadasundaram
Hi Bill,

  Thanks for the help. The following code segment after checking the
TwitterClient example in the resteasy distribution worked for me. The idea
is to reuse the same underlying client executor for both the login service
and business service. This indirectly means that the same http client is
being used which in turn causes the cookies received to be passed back.

HttpClient httpClient = new DefaultHttpClient();
ClientExecutor clientExecutor = new
ApacheHttpClient4Executor(httpClient);
authService = ProxyFactory.create(AuthenticationService.class, 
http://localhost:/app/login;, clientExecutor);
bizService = ProxyFactory.create(BusinessService.class, 
http://localhost:/app/businessfunc;, clientExecutor);

RESTEasy rocks 

Thanks,
Saravana



On Sun, Nov 18, 2012 at 5:41 AM, Bill Burke bbu...@redhat.com wrote:

 You'll have to configure the underlying Apache Http client 4
 DefaultHttpClient.  Javadoc should give you an idea.

 On 11/17/2012 2:11 AM, Saravanabavagugan Vengadasundaram wrote:
  Hello All,
 
 I am using the RESTEasy client framework for testing my web services.
  I have a login API that accepts user credentials and creates a session
  cookie. Subsequent to the call to this API, I can call other APIs in my
  system which will expect the session cookie to be passed back. I have
  two questions.
 
  1) Is there are way to set a configuration in RESTEasy client classes
  have all the cookies received in the first call to be pased back in
  subsequent calls.
 
  2) If #1 is not possible, is there a way to read a cookie from
  ClientResponse or using some other mechanism. I can then pass the cookie
  value using @CookieParam.
 
  Any help is highly appreciated.
 
  --
  regards,
  Saravanabavagugan
  Senior Software Engineer
 
 
 
 --
  Monitor your physical, virtual and cloud infrastructure from a single
  web console. Get in-depth insight into apps, servers, databases, vmware,
  SAP, cloud infrastructure, etc. Download 30-day Free Trial.
  Pricing starts from $795 for 25 servers or applications!
  http://p.sf.net/sfu/zoho_dev2dev_nov
 
 
 
  ___
  Resteasy-users mailing list
  Resteasy-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/resteasy-users
 

 --
 Bill Burke
 JBoss, a division of Red Hat
 http://bill.burkecentral.com


 --
 Monitor your physical, virtual and cloud infrastructure from a single
 web console. Get in-depth insight into apps, servers, databases, vmware,
 SAP, cloud infrastructure, etc. Download 30-day Free Trial.
 Pricing starts from $795 for 25 servers or applications!
 http://p.sf.net/sfu/zoho_dev2dev_nov
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/resteasy-users




-- 
regards,
Saravanabavagugan
Senior Software Engineer
Xactly Corporation
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] Automatic Cookie Passing

2012-11-17 Thread Bill Burke
You'll have to configure the underlying Apache Http client 4 
DefaultHttpClient.  Javadoc should give you an idea.

On 11/17/2012 2:11 AM, Saravanabavagugan Vengadasundaram wrote:
 Hello All,

I am using the RESTEasy client framework for testing my web services.
 I have a login API that accepts user credentials and creates a session
 cookie. Subsequent to the call to this API, I can call other APIs in my
 system which will expect the session cookie to be passed back. I have
 two questions.

 1) Is there are way to set a configuration in RESTEasy client classes
 have all the cookies received in the first call to be pased back in
 subsequent calls.

 2) If #1 is not possible, is there a way to read a cookie from
 ClientResponse or using some other mechanism. I can then pass the cookie
 value using @CookieParam.

 Any help is highly appreciated.

 --
 regards,
 Saravanabavagugan
 Senior Software Engineer


 --
 Monitor your physical, virtual and cloud infrastructure from a single
 web console. Get in-depth insight into apps, servers, databases, vmware,
 SAP, cloud infrastructure, etc. Download 30-day Free Trial.
 Pricing starts from $795 for 25 servers or applications!
 http://p.sf.net/sfu/zoho_dev2dev_nov



 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/resteasy-users


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


[Resteasy-users] Automatic Cookie Passing

2012-11-16 Thread Saravanabavagugan Vengadasundaram
Hello All,

  I am using the RESTEasy client framework for testing my web services. I
have a login API that accepts user credentials and creates a session
cookie. Subsequent to the call to this API, I can call other APIs in my
system which will expect the session cookie to be passed back. I have two
questions.

1) Is there are way to set a configuration in RESTEasy client classes have
all the cookies received in the first call to be pased back in subsequent
calls.

2) If #1 is not possible, is there a way to read a cookie from
ClientResponse or using some other mechanism. I can then pass the cookie
value using @CookieParam.

Any help is highly appreciated.

-- 
regards,
Saravanabavagugan
Senior Software Engineer
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users