title: Change Namespace URI in Spring SOAP WS
body: <p>We have some legacy systems that consume the same <code>@Endpoint</code> however each with a different namespace. The payload, implementation and functionality are the same except for the namespace of the <code>SOAPBody</code>'s first child element.</p>
  <p>How would I replace the namespace of the incoming SOAP request to a generic one before it reaches the <code>Endpoint</code>? Tried playing with the <code>EndpointInterceptor</code> however unable to find a method to replace the namespace.</p>
  <p><strong>Legacy System 1:</strong></p>
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;GetRecordsRequest xmlns=&quot;http://www.test.com/system1&quot;&gt;
           &lt;maxRecords&gt;100&lt;/maxRecords&gt;
        &lt;GetRecordsRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  <p><strong>Legacy System 2:</strong></p>
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;GetRecordsRequest xmlns=&quot;http://www.abctest.com/system2&quot;&gt;
           &lt;maxRecords&gt;100&lt;/maxRecords&gt;
        &lt;GetRecordsRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>