title: Create and link XSD to a WADL
body: <p>I am creating some services using JAX-RS that need to take in arbitrarily complex objects as arguments, not just primitives like integers and strings. <a href="http://cxf.547215.n5.nabble.com/Complex-objects-as-FormData-and-the-Client-Proxy-API-tt4426639.html#a4430141#none" rel="noreferrer">A discussion on the CXF mailing list</a> says to just use a wrapper object as a single parameter in this case.</p>
  
  <p>My concern is how to document the input format to the service? If creating a service that looks something like the following:</p>
  
  <pre><code>@POST
  @Produces("application/json")
  @Consumes("application/json")
  @Path("oneParam")
  public ComplexObject2 myServiceMethod(ComplexObject1 obj) {
      Foo f = obj.foo
      Bar b = obj.bar
      ...
  }
  </code></pre>
  
  <p>the auto-generated WADL that CXF produces will only produce the following:</p>
  
  <pre><code>&lt;resource path="/oneParam"&gt;
     &lt;method name="POST"&gt;
        &lt;request&gt;
              &lt;representation mediaType="application/json"/&gt;
        &lt;/request&gt;
        &lt;response&gt;
               &lt;representation mediaType="application/json"/&gt;
         &lt;/response&gt;
     &lt;/method&gt;
  &lt;/resource&gt; 
  </code></pre>
  
  <p>This contains no information on what the request or response actually contains. Sergey on the CXF mailing list said it was possible to link a schema to the representation, but how am I supposed to do that? And how do I create the XSD?</p>
  
  <p>(P.S. Using POST for idempotent resources might not be RESTful, but it's not important here as we are in essence doing RPC using Json. This is more or less a 1:1 clone of an existing SOAP based api.)</p>