title: NoMessageBodyWriterFoundFailure at sending ByteArrayOutputStream through REST service
body: <p>I have to send a ByteArrayOutputStream through a rest service, and I got this exception: </p>
  
  <p><code>org.jboss.resteasy.client.ClientResponseFailure: Unable to find a MessageBodyReader of content-type text/html;charset="iso-8859-1" and type class java.io.ByteArrayOutputStream</code></p>
  
  <p>I don't understand why and I have to make it work.</p>
  
  <p>Here is my rest service:</p>
  
  <pre><code>@POST
  @Path("/exported")
  @Consumes(MediaType.APPLICATION_XML)
  public ByteArrayOutputStream getExported(Wrapper wrapper) {
  
      ByteArrayOutputStream os = null;
  
      os = new ByteArrayOutputStream();
      try {
          os.write("TTT".getBytes());
      } catch (IOException e) {
          e.printStackTrace();
      }
  
      return os;
  
  }
  </code></pre>
  
  <p>Here is my client:</p>
  
  <pre><code>    ClientRequest request = new ClientRequest("http://localhost:8081/restws/rest/rrr/exported");
      request.accept(MediaType.APPLICATION_XML);
  
      request.body(MediaType.APPLICATION_XML, new Wrapper(
              listOf Objects));
  
      ClientResponse&lt;ByteArrayOutputStream&gt; response = request
              .post(ByteArrayOutputStream.class);
  
      ByteArrayOutputStream os = response.getEntity();
  
      return "success";
  </code></pre>
  
  <p>Everything in the class containing this method works, except this method.</p>