title: How can I work with both xml/json and form-urlencoded?
body: <p>I'm trying to test using same method for both <code>application/(xml|json)</code> and <code>application/x-www-form-urlencoded</code>.</p>
  
  <p>I have an entity class looks like this</p>
  
  <pre class="lang-java prettyprint-override"><code>@XmlRootElement
  public class Person {
      @XmlElement private int age;
      @XmlElement private String name;
  }
  </code></pre>
  
  <p>With following method,</p>
  
  <pre class="lang-java prettyprint-override"><code>@POST
  @Consumes({APPLICATION_XML, APPLICATION_JSON})
  public Response createSingle(@NotNull final Person person) {
  }
  </code></pre>
  
  <p>Both <code>application/xml</code> and <code>application/json</code> work fine.</p>
  
  <p>Now when I change the <code>Person</code> class like this</p>
  
  <pre class="lang-java prettyprint-override"><code>@XmlRootElement
  public class Person {
      @XmlElement @FormParam("age") private int age;
      @XmlElement @FormParam("name" private String name;
  }
  </code></pre>
  
  <p>and tries with following (changed) method.</p>
  
  <pre class="lang-java prettyprint-override"><code>@POST
  @Consumes({APPLICATION_XML, APPLICATION_JSON, APPLICATION_FORM_URLENCODED})
  public Response createSingle(@NotNull @BeanParam final Person person) {
  }
  </code></pre>
  
  <p>Only <code>application/x-www-form-urlencoded</code> works.</p>
  
  <p>Is this normal by specification?</p>