title: How to send JSON data in request body suing apache CXF webclient?
body: <p>I am using apache cxf webclient to consume a service written in .NET </p>
  
  <p>sample JSON to be sent in request body to a web service </p>
  
  <pre><code>{
     "Conditions":
        [
           {
              "Field":"TextBody",
              "Comparer":"ContainsAny",
              "Values":["stocks","retire"],
              "Proximity":0
           },
           {
              "Field":"SentAt",
              "Comparer":"LessThan",
              "Values":["1331769600"],
              "Proximity":0
           },
        ],
     "Operator":"And",
     "ExpireResultIn":3600
  }
  </code></pre>
  
  <p>Is there any way if I want to submit data from both form and in Json body in one request ?
  webclient API apache CXF - </p>
  
  <p><a href="http://cxf.apache.org/javadoc/latest/org/apache/cxf/jaxrs/client/WebClient.html" rel="noreferrer">web client API doc </a></p>
  
  <pre><code>WebClient client = WebClient.create("http://mylocalhost.com:8989/CXFTest/cxfws/rest/restservice/json");
   client.type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON);
  </code></pre>
  
  <p>After this which method and how to use ?</p>
  
  <pre><code>client.form(...form object )
  
  client.post(...JSON string ) 
  </code></pre>
  
  <p>They have not shared Object of  "Conditions"  in JSON which I can annotate and pass to post method of client </p>