title: StreamCorruptedException: invalid stream header:
body: <p>I am getting a StreamCorruptedException and I have no idea why or how it's happening.
  Any help would be awesome! 
  Here is the Client:</p>
  
  <pre><code>ClientConfig config = new DefaultClientConfig();
  Client client = Client.create(config);
  WebResource service = client.resource(getBaseURI());
  Map params = new HashMap&lt;String, Object&gt;();     
  Order[] orders = odao.getOpenOrdersByTenant(tenantID);
  
  JSONObject jObj = new JSONObject();
  jObj.put("params", params);
  jObj.put("sourcePath", System.getProperty("user.dir") + "/reports/OpenOrders.jasper");
  jObj.put("method", "html");
  jObj.put("datasource", orders);
  
  ClientResponse response =       service.path("rest").path("jasper").path("getJasperReport").type(MediaType.APPLICATION_JSON).post(ClientResponse.class,jObj);
  </code></pre>
  
  <p>Server:</p>
  
  <pre><code>@POST
  @Path("/getJasperReport")
  @Produces(MediaType.TEXT_HTML)
  @Consumes(MediaType.APPLICATION_JSON)
  public void getJasperReport(@Context HttpServletRequest servletRequest, @Context HttpServletResponse servletResponse, @Context UriInfo uriInfo )
                  throws ServletException, IOException{
  
  ObjectInputStream objInputStream = new ObjectInputStream(servletRequest.getInputStream());
  JSONObject jobj =  (JSONObject) objInputStream.readObject();         
  </code></pre>
  
  <p>The Second to last line throws a java.io.StreamCorruptedException: invalid stream header: 7B227061</p>