title: WSDL file for Apache CXF with "any xml" body
body: <p>Background: I'm developing web-service which communicates over WS-Management protocol. The original WSDL from here <a href="http://schemas.xmlsoap.org/ws/2005/06/management/wsman.wsdl" rel="nofollow">http://schemas.xmlsoap.org/ws/2005/06/management/wsman.wsdl</a> looks like:</p>
  
  <pre><code>&lt;xs:complexType name="SampleResourceType"&gt;
    &lt;xs:sequence&gt;
       &lt;xs:element name="PropertyA" type="xs:string"/&gt;
       &lt;xs:element name="PropertyB" type="xs:int"/&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;xs:element name="SampleResource" type="tns:SampleResourceType"/&gt;
  
  &lt;wsdl:message name="PutMessage"&gt;
    &lt;wsdl:part name="Body" element="tns:SampleResource"/&gt;
  &lt;/wsdl:message&gt;
  </code></pre>
  
  <p>And this WSDL works well with Apache CXF 2.4.0.</p>
  
  <p>My goal:
  Replace SampleResource definition with other to let operation handle any resource(XML). I'd like to create WSDL file for operation which SOAP output will look like:</p>
  
  <pre><code>&lt;soap:Envelope&gt;
    &lt;soap:Body&gt;
      &lt;SomeXmlDocument&gt;&lt;/SomeXmlDocument&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>And SomeXmlDocument means here any XML document defined in runtime. 
  The problem now CXF always puts predefined name from WSDL. 
  I'll show on examples:</p>
  
  <p>I'm using following command: <code>wsdl2java.bat -fe jaxws21 -d gen -exsh true -verbose file.wsdl</code></p>
  
  <p>If I use wsdl:</p>
  
  <pre><code>  &lt;xs:complexType name="CIMObjectType"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:any namespace="##other" minOccurs="0" processContents="lax"/&gt; 
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:element name="CIMObject" type="tns:CIMObjectType"/&gt;
  
    &lt;wsdl:message name="GetResponseMessage"&gt;
       &lt;wsdl:part name="Body" element="tns:CIMObject"/&gt;
    &lt;/wsdl:message&gt;
  </code></pre>
  
  <p>The output looks like: </p>
  
  <pre><code>&lt;soap:Body&gt;
    &lt;ns8:CIMObject&gt;
      &lt;XXX&gt;
        &lt;DeviceID&gt;XXX:YYY&lt;/DeviceID&gt;
      &lt;/XXX&gt;
    &lt;/ns8:CIMObject&gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>If I use: </p>
  
  <pre><code>  &lt;xs:complexType name="CIMObjectType"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:any namespace="##other" minOccurs="0" processContents="lax"/&gt; 
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
    &lt;xs:element name="CIMObject" type="tns:CIMObjectType"/&gt;
  
    &lt;wsdl:message name="GetResponseMessage"&gt;
       &lt;wsdl:part name="Body" type="tns:CIMObjectType"/&gt;
    &lt;/wsdl:message&gt;
  </code></pre>
  
  <p>Output looks like:</p>
  
  <pre><code>&lt;soap:Body&gt;
    &lt;Body&gt;
      &lt;XXX&gt;
        &lt;DeviceID&gt;XXX:YYY&lt;/DeviceID&gt;
      &lt;/XXX&gt;
    &lt;/Body&gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>But I need:</p>
  
  <pre><code>&lt;soap:Body&gt;
      &lt;XXX&gt;
        &lt;DeviceID&gt;XXX:YYY&lt;/DeviceID&gt;
      &lt;/XXX&gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>So, the question is: how to modify WSDL to have output I need? Any help is greatly appreciated</p>