Hi Andy, Nicolas
I just wonder why the exception was raised in the outbound response chain.
Nicolas, do you have service doing a client call first, then reading the
entity, then returning the same Response ?
As Andy indicated .bufferEntity() can help, but the service client will
probably see HTTP headers returned from the internal call, may be better
create a new Response instance
Sergey
On 15/06/17 11:47, Andy McCright wrote:
Hi Nicolas,
According to the spec, you can only read an entity once. If you want to
read it twice (or more) from the same Response object you should call
Response.bufferEntity() first.
Hope this helps,
Andy
On Thu, Jun 15, 2017 at 4:36 AM nicolasduminil <
[email protected]> wrote:
Hi Sergey,
Many thanks for your reply to my post. No, I don't use any Response.close()
anywhere. But there is a:
Response resp = client.target(...)...;
String s = response.readEntity(String.class);
...
Does readEntity() close the response ? Is there anyway to test the response
such that to see weather it is closed ?
Many thanks in advance,
Nicolas DUMINIL
--
View this message in context:
http://cxf.547215.n5.nabble.com/CXF-3-0-3-java-lang-IllegalStateException-Entity-is-not-available-on-the-return-from-a-JAX-RS-service-tp5781201p5781222.html
Sent from the cxf-user mailing list archive at Nabble.com.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/