title: Axis2: extract explicit XML from strongly-typed response classes?
body: <p>I have a legacy Java webservice based on Axis2. This webservice classes consist of:</p>
  
  <ul>
  <li>a service interface (generated from WSDL);</li>
  <li>an implementation of the service (written in-house);</li>
  <li>a bunch of autogenerated entity-like classes representing requests and responses.</li>
  </ul>
  
  <p>I also have a requirement to extract and cache part of one of the responses to XML (ultimately going to the filesystem as a well-formed document). I've been hacking around with the <code>getOMElement()</code> method on the response classes for serialisation, but to no avail. The deserialise looks easier, as the generated classes all have a <code>Factory</code> static member that will take XML in and produce objects.</p>
  
  <p><strong>how can I serialise a subset of the strongly-typed object graph to XML in a way that the generated Axis2 <code>Factory</code> can subsequently deserialise?</strong></p>
  
  <p>ps: I'm stuck with Axis2. Yes, this is very easy with (say) xfire...</p>