title: Pass Crendentials from dotNet client to Java Web Service
body: <p>I have a dot net application that call a java web service. I am trying to implement authentication by passing credentials to the java service. Here is the dot net code setting the credentials. How can I get these credentials in my java application? They aren't set in the headers...</p>
  
  <pre><code> System.Net.NetworkCredential serviceCredentials = new NetworkCredential("user", "pass");
   serviceInstance.Credentials = serviceCredentials;
  </code></pre>
  
  <p>serviceInstance is an instance of SoapHttpClientProtocol.</p>
  
  <p>I've tried injecting the WebServiceContext like so</p>
  
  <pre><code>@Resource
  WebServiceContext wsctx;
  </code></pre>
  
  <p>and pulling the crentials from the headers but they aren't there.</p>