title: Attribute on root element in a JAX-WS service
body: <p>I'm trying to annotate a java class which will in the input param in an JAX-WS based web service.</p>
  
  <p>The following is the input class</p>
  
  <pre><code>@XmlRootElement
  class InputClass
     @XmlAttribute
     private String type;
     @XmlElement
     private String id;
  </code></pre>
  
  <p>and the service operation signature:</p>
  
  <pre><code>@WebResult(name = "success")
  public boolean operation(@WebParam(name = "input") InputClass input);
  </code></pre>
  
  <p>This gives input xml that look like this:</p>
  
  <pre><code>&lt;input&gt;
     &lt;id type="something"&gt;an_id&lt;/id&gt;
  &lt;/input&gt;
  </code></pre>
  
  <p>Is there any way to map the InputClass so that it produces XML that look like this:</p>
  
  <pre><code>&lt;id type="something"&gt;an_id&lt;/id&gt;
  </code></pre>