title: namespace issue on web service with Apache CXF
body: <p>I'm using Apache CXF 2.7.3, and running into a namespace issue that I really don't understand. I've tried extensively to search on this, but most of the results that I find are for different behaviors.  The issue is when invoking the web service, it will fail if the parameter element is namespace qualified.  All the rest of the elements in the message are qualified, and it accepts that, just not the parameter element. Here is the precise behavior: </p>
  
  <p>request <em>WITHOUT</em> parameter element qualified:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                    xmlns:ord="http://www.example.org/order"&gt;
  &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;ord:getOrder&gt;
           &lt;id&gt;a&lt;/id&gt;
        &lt;/ord:getOrder&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>results in success: </p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;soap:Body&gt;
        &lt;ns2:getOrderResponse xmlns:ns2="http://www.example.org/order"&gt;
           &lt;return&gt;
              &lt;ns2:errorCode/&gt;
              &lt;ns2:errorMessage/&gt;
              &lt;ns2:order&gt;
                 &lt;ns2:orderNumber&gt;ABC123&lt;/ns2:orderNumber&gt;
                 &lt;ns2:lastName&gt;Smith&lt;/ns2:lastName&gt;
              &lt;/ns2:order&gt;
           &lt;/return&gt;
        &lt;/ns2:getOrderResponse&gt;
     &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>request <em>WITH</em> parameter qualified: </p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
                    xmlns:ord="http://www.example.org/order"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;ord:getOrder&gt;
           &lt;ord:id&gt;a&lt;/ord:id&gt;
        &lt;/ord:getOrder&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>results in exception from JAXB: </p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;soap:Body&gt;
        &lt;soap:Fault&gt;
           &lt;faultcode&gt;soap:Client&lt;/faultcode&gt;
           &lt;faultstring&gt;Unmarshalling Error: unexpected element (uri:"http://www.example.org/order", local:"id"). Expected elements are &amp;lt;{}id&gt;&lt;/faultstring&gt;
        &lt;/soap:Fault&gt;
     &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>In all the research I have done, this usually means that a namespace doesn't match up somewhere. But I have checked it thoroughly, and the namespace is identical everywhere, including the ObjectFactory.class, package-info.class, and the cxf-servlet.xml configuration file as well as the @WebService annotation.  Can anyone point me in the right direction as to what I am missing here? </p>