title: Exception 401 with web service authentication
body: <p>This web service I run on WEBLOGIC server. Everything seems fine when I paste the URL WSDL to the browser, and the browser prompt to enter username, password. But in the client, when I invokes the service with the authentication same I did with the server, the server response with a 401 Exception.</p>
  
  <p>This is my client code </p>
  
  <pre><code>SupplierService service = new SupplierService();
  port = service.getSupplierPort();
  Map&lt;String, Object&gt; rc = ((BindingProvider)port).getRequestContext();
  rc.put(BindingProvider.USERNAME_PROPERTY, "username");
  rc.put(BindingProvider.PASSWORD_PROPERTY, "pass");
  
  port.hello();
  </code></pre>
  
  <p>This is my web.xml configuration (the url wsdl is : localhost/shop/SupplierService?WSDL)</p>
  
  <pre><code>&lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
          &lt;web-resource-name&gt;Web service resources&lt;/web-resource-name&gt;
          &lt;url-pattern&gt;/SupplierService&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
  
      &lt;auth-constraint&gt;
          &lt;role-name&gt;suppliers&lt;/role-name&gt;
      &lt;/auth-constraint&gt;
  &lt;/security-constraint&gt;
  
  &lt;security-role&gt;
      &lt;role-name&gt;suppliers&lt;/role-name&gt;
  &lt;/security-role&gt;
  </code></pre>
  
  <p>This is my weblogic.xml</p>
  
  <pre><code>&lt;wls:context-root&gt;ass&lt;/wls:context-root&gt;
  
  &lt;wls:security-role-assignment&gt;
          &lt;wls:role-name&gt;suppliers&lt;/wls:role-name&gt;
          &lt;wls:principal-name&gt;SupplierGroup&lt;/wls:principal-name&gt;
  &lt;/wls:security-role-assignment&gt;
  </code></pre>
  
  <p>So is there anything I missing</p>