Description
Hi,
I'm trying to use org.restlet.resource.ClientResource object to communicate with the REST interface of JasperReports. To preserve session state across multiple requests, JasperReports requires you to start with a login request where the username and password are passed as query params. It will then return a response with a custom header item "Set-Cookie", e.g.,
Set-Cookie: JSESSIONID=488AAF4E493E1FE5BEA25F6D71C025F3; Path=/jasperserver; HttpOnly
This header item (with JSESSIONID) must be added to the header of each subsequent request. I have a stand-alone Java program that can successfully do a multi-step communication using JSESSIONID using the Apache HTTP client directly. In our Restlet environment (with Hibernate) this doesn't work so my colleague Roland Beuker suggested I use the server-side ClientResource object which is a more proper way of handling outgoing calls to external services. I'm getting a 200 response from the JasperReports server, however, the required header item "Set-Cookie" is not there anymore.
Is it possible that this header item gets removed or filtered out somewhere in the exchange?
Kind regards,
Ralph