WSDL soap response validation <p>I have a wsdl that defines a schema with:</p> <pre><code>&lt;xsd:schema elementFormDefault="unqualified" targetNamespace="http://www.xpto.com/xpto"&gt; </code></pre> <p>and the element:</p> <pre><code>&lt;xsd:element name="insertResponse"&gt; &lt;xsd:complexType&gt; &lt;xsd:sequence&gt; &lt;xsd:element maxOccurs="1" minOccurs="1" name="sys_id" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="1" name="table" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="1" name="display_name" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="1" name="display_value" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="1" name="status" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="0" name="status_message" type="xsd:string"/&gt; &lt;xsd:element maxOccurs="1" minOccurs="0" name="error_message" type="xsd:string"/&gt; &lt;/xsd:sequence&gt; &lt;/xsd:complexType&gt; &lt;/xsd:element&gt; </code></pre> <p>but when i execute the operation and get the response, SoapUI says its invalid:</p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;SOAP-ENV:Body&gt; &lt;insertResponse xmlns="http://www.xpto.com/xpto"&gt; &lt;sys_id&gt;something&lt;/sys_id&gt; &lt;table&gt;something&lt;/table&gt; &lt;display_name&gt;number&lt;/display_name&gt; &lt;display_value&gt;something&lt;/display_value&gt; &lt;status&gt;something&lt;/status&gt; &lt;/insertResponse&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>The SoapUI message (with lines wrapped for legibility):</p> <pre><code>line 4: Expected element 'sys_id' instead of 'sys_id@http://www.xpto.com/xpto' here in element insertResponse@http://www.xpto.com/xpto </code></pre> <p>If i change the WSDL to include <code>elementFormDefault="qualified"</code>, in the schema, the same response is valid.</p> <p>Why is this response invalid without <code>elementFormDefault="qualified"</code> and what is the correct way to do it?</p> <p>Also the code generated against this WSDL doesn't like the response either, failing with:</p> <pre><code>Unmarshalling Error: unexpected element (uri:\\"http://www.xpto.com/xpto\\", local:\\"sys_id\\"). Expected elements are &lt;{}table&gt;,&lt;{}display_value&gt;,&lt;{}display_name&gt;, &lt;{}error_message&gt;,&lt;{}sys_id&gt;,&lt;{}status_message&gt;,&lt;{}status&gt; </code></pre> <p>(Again, lines wrapped for legibility.)</p> <p>Using apache-cxf.</p>