title: CXF RestFul Service - Get Post Body Parameters
body: <p>I have developed a webservice following the below link, however I am unable to get the request parameters from the POST request body. </p>
  
  <p><a href="http://info.appdirect.com/blog/how-to-easily-build-rest-web-services-with-java-spring-and-apache-cxf" rel="nofollow">http://info.appdirect.com/blog/how-to-easily-build-rest-web-services-with-java-spring-and-apache-cxf</a></p>
  
  <p>I use the Soap UI to invoke the
  service, with "Post QueryString in Message Body" option checked. 
  So far, I have tried below options, but none seem to work:</p>
  
  <ul>
  <li><p>Tried <strong>MultiValued Map</strong>, but the map is always empty.</p>
  
  <pre><code>@POST
  @Path("/getpostfile/{fileName}")
  @Produces("application/pdf")
  @Consumes("application/x-www-form-urlencoded")
  public Response getPostFile(MultivaluedMap form){...}
  </code></pre></li>
  <li><p>Tried <strong>@FormParam()</strong> &amp; <strong>@QueryParam</strong> as well, but still the params are null in webservice method.</p></li>
  <li><p>Tried creating a POJO bean with <strong>@XmlRootElement</strong> annotation, however this time I get an exception saying <strong>"SEVERE: No message body reader has been found for class com.wcc.LoginInfo, ContentType: application/x-www-form-urlencoded"</strong>. LoginInfo is my bean class with two parameters:</p>
  
  <pre><code>@XmlRootElement
  public class LoginInfo {
      String username;
      String password;
      ....
  </code></pre></li>
  </ul>
  
  <p>Below is the service method:</p>
  
  <pre><code>    @POST
      @Path("/getpostfile/{fileName}")
      @Produces("application/pdf")
      @Consumes("application/x-www-form-urlencoded")
      public Response getPostFile(LoginInfo logininfo){...}
  </code></pre>
  
  <p>Below is my cxf-beans.xml file:</p>
  
  <pre><code>    &lt;bean .....&gt;
      &lt;jaxrs:server id="wccservice" address="/"&gt;
         &lt;jaxrs:serviceBeans&gt;
             &lt;ref bean="wccdocumentservice" /&gt;
         &lt;/jaxrs:serviceBeans&gt;
         &lt;jaxrs:providers&gt;
              &lt;ref bean="formUrlEncodeProvider" /&gt;
         &lt;/jaxrs:providers&gt;
   &lt;/jaxrs:server&gt;
  
  
   &lt;bean id="wccdocumentservice" class="com.wcc.WCCDocumentServiceImpl" /&gt;
   &lt;bean id="formUrlEncodeProvider" class="org.apache.cxf.jaxrs.provider.FormEncodingProvider" /&gt;
   &lt;bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"&gt;
      &lt;property name="marshallAsJaxbElement" value="true" /&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>Any ideas on how to retrieve the POST parameters in request body, in the Webservice method?</p>