Hi there!

I'm currently trying to work with the CXF client API and the nice proxy feature 
it provides. Now, one of my API methods returns a javax.ws.rs.core.Response 
wrapping an entity. This entity is a JAXB annotated class which is serialized 
to JSON and shall be deserialized on client side. Now, when I execute the 
client I get the following error message:

  java.lang.ClassCastException: 
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream cannot be cast to 
MyDtoClass

According to [1] one can use the ResponseReader class such that the stream will 
be deserialized to the expected type. However, it seems that starting with CXF 
2.7.0 (I'm using 2.7.3) this class is missing. Can you enlighten me here?

Cheers,
Daniel

[1] 
http://cxf.apache.org/docs/jax-rs-client-api.html#JAX-RSClientAPI-Limitations

Reply via email to