title: WSDL over HTTPS in Java
body: <p>We have a java client (not a web app, just a simple batch written in Java)
   which has to connect to a web service over https.
  The Web Service lies in an Apache Tomcat Server (7.0) 
  but I do not link directly to it because there is an IIS reverse proxy
   which exposes the service over https, so the certificates are in the IIS layer 
  not in Tomcat.
  I notice something strange in the WSDL, i.e. the Service section still has an address like this</p>
  
  <pre><code>&lt;soap:address location="http://myApp.it:80/Questionario/CallQuestionario"/&gt;
  </code></pre>
  
  <p>as it does also the type section :</p>
  
  <pre><code>&lt;xsd:schema&gt;
  &lt;xsd:import namespace="http://www.test.it" schemaLocation="http://myApp:80/Questionario/CallQuestionario?xsd=1"/&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>I still see the location and schemaLocation pointing to an http not https!
  In fact I get an error when trying to connect to the Web Service:
       com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect</p>
  
  <p>Do you think there is some work to do in the IIS layer to fix this problem?
  Even if I try to connect using Soap-UI I have this error:
      java.lang.Exception: Failed to load url; <a href="https://myApp.it:80/Questionario/CallQuestionario?wsdl" rel="nofollow">https://myApp.it:80/Questionario/CallQuestionario?wsdl</a>, 0 - 
  it looks like the analysis of the Web Service failed.</p>
  
  <p>PS: 
  Instead if I create a certificate for Tomcat using the keytool utility and I configure Tomcat editing the server.xml file I notice that, 
  without changing the code of the service, the section gets automaticly updated with the url value in https both in service and type section.
  In this case (Web Service deployed on Tomcat in https) , after importing the certificate in the client using the following lines of code</p>
  
  <pre><code>    System.setProperty("javax.net.ssl.trustStore", "[PATH_TO_THE_CERTIFICATE]");
  System.setProperty("javax.net.ssl.trustStorePassword", "[PWD]");
  System.setProperty("javax.net.ssl.trustStoreType", "JKS");
  </code></pre>
  
  <p>everything works as it is expected to .</p>