title: How to use wsimport when server expects client certificate?
body: <p>I have a web service using mutual SSL authentication.  I can access it just fine in the browser when I have the client's certificate installed.</p>
  
  <p>I need to be able to access this using <code>wsimport</code> for generating the Java code to access the service.</p>
  
  <p>How can I set up my credentials so that I may access the URL using <code>wsimport</code>?</p>
  
  <p>Here's an example of what I'm trying, but it times out due to the inability to authenticate.</p>
  
  <p><code>wsimport ./sample.wsdl -p com.company.ws.sample -Xnocompile -d ./src -extension -keep -XadditionalHeaders</code></p>
  
  <p>Thanks for any help</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>This is what <code>wsimport</code> prints.  The WSDL is definitely valid, and at the given location, it's a matter of figuring out how to pass in my credentials for authenticating:</p>
  
  <pre><code>wsimport https://wsdl.location.com?WSDL -p com.company.ws.sample -Xnocompile 
  -d ./src -extension -keep -XadditionalHeaders
  
  
  parsing WSDL...
  
  [ERROR] Received fatal alert: handshake_failure
  
  Failed to read the WSDL document: "https://wsdl.location.com?WSDL", because 1) could 
  not find the document; /2) the document could not be read; 3) the root element of 
  the document is not &lt;wsdl:definitions&gt;.
  
  [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
  
   At least one WSDL with at least one service definition needs to be provided.
  
      Failed to parse the WSDL.
  </code></pre>