title: Get rid of empty xmlns element in JAX-WS
body: <p>I am trying to generate a request like this using JAX-WS Client:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:alin="http://www.alinma.com" xmlns="http://www.alinma.com"&gt; 
  &lt;soapenv:Header/&gt;
  &lt;soapenv:Body&gt;
      &lt;alin:CustDtlsInqRq&gt;
          &lt;alin:MsgRqHdr&gt;
              &lt;RqUID&gt;BPM11957T201508101626333904816&lt;/RqUID&gt;
              &lt;SCId&gt;BPMP&lt;/SCId&gt;
              &lt;FuncId&gt;24000000&lt;/FuncId&gt;
              &lt;RqMode&gt;0&lt;/RqMode&gt;
              &lt;CustLangPref&gt;En&lt;/CustLangPref&gt;
              &lt;CustId&gt;
                  &lt;CIF&gt;6060&lt;/CIF&gt;
              &lt;/CustId&gt;
              &lt;AgentId&gt;OprtSupportReviewer&lt;/AgentId&gt;
          &lt;/alin:MsgRqHdr&gt;
          &lt;Body&gt;
              &lt;CIF&gt;6060&lt;/CIF&gt;
          &lt;/Body&gt;
      &lt;/alin:CustDtlsInqRq&gt;
  &lt;/soapenv:Body&gt;
  </code></pre>
  
  <p></p>
  
  <p>But the request is generated like this:</p>
  
  <pre><code>&lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.alinma.com"&gt;
  &lt;S:Header/&gt;
  &lt;S:Body&gt;
      &lt;ns2:CustDtlsInqRq xmlns:ns2="http://www.alinma.com"&gt;
          &lt;MsgRqHdr xmlns=""&gt;
              &lt;RqUID&gt;OLPM201508261333149660000020&lt;/RqUID&gt;
              &lt;SCId&gt;BPMP&lt;/SCId&gt;
              &lt;FuncId&gt;24000000&lt;/FuncId&gt;
              &lt;CustLangPref&gt;En&lt;/CustLangPref&gt;
              &lt;CustId&gt;
                  &lt;CIF&gt;6060&lt;/CIF&gt;
              &lt;/CustId&gt;
          &lt;/MsgRqHdr&gt;
          &lt;Body xmlns=""&gt;
              &lt;CIF&gt;6060&lt;/CIF&gt;
          &lt;/Body&gt;
      &lt;/ns2:CustDtlsInqRq&gt;
  &lt;/S:Body&gt;
  </code></pre>
  
  <p></p>
  
  <p>the added tag <code>xmlns=""</code> makes problems in server side
  This is the code of my Handler that surround the request with SOAP Envelop</p>
  
  <pre><code>if (outboundProperty.booleanValue()) {
  
          try {
              SOAPMessage soapMessage = context.getMessage();
  
              SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
              soapEnvelope.addNamespaceDeclaration("", "http://www.alinma.com");
              // Grab the header of the SOAP envelop
              SOAPHeader soapHeader = soapEnvelope.getHeader();
  
              // Attach a new header if there is none...
              if (soapHeader == null) {
                  soapHeader = soapEnvelope.addHeader();
              }
  
              soapMessage.saveChanges();
              soapMessage.writeTo(System.out); //TODO: remove this line (just for debugging)
  
          } catch (Exception e) {
              logger.error("Error Creating SOAP message", e);
          }  
  
      }
  </code></pre>
  
  <p>How can I adjust the empty <code>xmlns</code> tags?</p>