I have a simple client that uses a WebClient to get jpg data from a REST
service:
 
  byte[] bytes = client.path("somepath").get(byte[].class);

When I use the following dependency:

         <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
            <version>3.0.0-milestone2</version>
        </dependency>

Everything works fine.  If I change the version to anything later than that,
the bytes that are returned appear to be somewhat corrupted (it looks like
extended characters are affected).  I can't tell if the encoding is off or
what, but I've tried setting the Encoding (UTF-8 & UTF-16) and the MimeType
(application/octet-stream), but nothing seems to make a difference.  I
modified the code and tried:

  Response response = client.path("somepath").get();
  byte[] bytes = response.readEntity(byte[].class);

So I can examine the response headers, and they are identical when comparing
using version 3.0.0-milestone2 to any of the other versions.  When using the
milestone version, the response header indicates that the encoding is UTF-8.

Is there a different approach that I should use to retrieve raw data?



--
View this message in context: 
http://cxf.547215.n5.nabble.com/data-seems-corrupt-in-versions-after-3-0-0-milestone2-tp5781395.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to