title: SOAP Request JAX-WS wrong namespace URI generated
body: <p>I want to connect to a SOAP service.  </p>
  
  <p>using wsimport I've generated classes from a remote wsdl</p>
  
  <p>My code:</p>
  
  <pre><code>    Lists listsService = new Lists();
      ListsSoap lisoap = listsService .getListsSoap(); 
  
      ((BindingProvider) si).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "MY_USER");
      ((BindingProvider) si).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "“MY_PASS");
  
      ((BindingProvider) si).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://&lt;SOME_REMOTE_URL&gt;/Lists.asmx");
  
  
     GetListCollectionResult coll = si.getListCollection();
  </code></pre>
  
  <p>I've traced the request xml:</p>
  
  <pre><code>&lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap1="http://schemas.microsoft.com/sharepoint/soap/"&gt;
     &lt;S:Header/&gt;
     &lt;S:Body&gt;
        &lt;soap1:GetListCollection/&gt;
     &lt;/S:Body&gt;
  &lt;/S:Envelope&gt;
  </code></pre>
  
  <p><a href="http://schemas.xmlsoap.org/soap/envelope" rel="nofollow">http://schemas.xmlsoap.org/soap/envelope</a> - is wrong!</p>
  
  <p>Returns empty result, both in java and SOAP-UI</p>
  
  <p>the correct URI should be <a href="http://www.w3.org/2003/05/soap-envelope" rel="nofollow">http://www.w3.org/2003/05/soap-envelope</a></p>
  
  <p>It works in SOAP-UI but i don't know how to set it in java for JAX-WS</p>
  
  <p>I suspect it's related to SOAP version 1 vs 1.2 </p>
  
  <p><strong>UPDATE:</strong><br>
  Tried to run this:</p>
  
  <pre><code> soapEnv.setAttributeNS("http://schemas.xmlsoap.org/soap/envelope/", "S", "http://www.w3.org/2000/xmlns/");
  </code></pre>
  
  <p>But the output now is:</p>
  
  <pre><code>&lt;S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" ns0:S="http://www.w3.org/2000/xmlns/"&gt;
  </code></pre>
  
  <p>Almost good but not enoguh</p>