title: How to pass a custom object in REST webservice
body: <p>i'm having problems transfering a custom object to the client. How can i transfer a custom object to the client and receive it back to the webservice? i'm transferring a file by chunks. i want to know how i should write my client. i tried passing it as <code>MediaType.APPLICATION_JSON</code> in client but i get no result meaning it doesn't get passed back to the webservice. Below is a bit of code im working on. </p>
  
  <p><strong>Webservice</strong></p>
  
  <pre><code> @POST
      @Path("/fileTransfer")
      @Consumes({MediaType.APPLICATION_JSON})
      @Produces({MediaType.APPLICATION_JSON})
      public final TransferInfomation transferInfo(final FileModel file)
  {
  ...
  }
  </code></pre>
  
  <p>...(some code)(lets just say a <em>syso</em>)</p>
  
  <p><strong>FileModel Class</strong></p>
  
  <pre><code>public class FileModel {
  
  private String fileID;
  private DataHandler dataHandler;
  
  /**
   * Constructor.
   */
  public FileModel() {
  }
  </code></pre>
  
  <p>(lets assume setters and getters are made)</p>
  
  <p>(Not sure if the webservice is correct). Still learning REST, i want to know how the client should be.</p>
  
  <p>thanks in advance.</p>