title: javax.ws.rs.BadRequestException: HTTP 400 Bad Request
body: <p>I have a JAX RS Rest service whose Request Class is as below</p>
  
  <pre><code>@XmlRootElement(name = "CDSRequest")
  @XmlSeeAlso({MyClass.class})
  @XmlType(name = "CDSRequest", propOrder = {"data", "refClass"})
  public class CDSRequest {
      Object data;
      Class  refClass;
  
      public Class getRefClass() {
          return refClass;
      }
  
      public void setRefClass(Class refClass) {
          this.refClass = refClass;
      }
  
      public Object getData() {
          return data;
      }
  
      public void setData(Object data) {
          this.data = data;
      }
  }
  </code></pre>
  
  <p>When I make REST call using the above request object, I get below error. I suspect the issue with generic Object type for data. But i thought <code>**@XmlSeeAlso**</code> will resolve it. Please help</p>
  
  <pre><code>javax.ws.rs.BadRequestException: HTTP 400 Bad Request
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:426)
  at org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:290)
  at org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:585)
  at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:551)
  at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:205)
  at com.sun.proxy.$Proxy93.pushRawData(Unknown Source)
  </code></pre>