1、%Tomcat%/server/server.xml
找到下面一段:
<!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> -->
替换为:
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" disableUploadTimeout="true" enableLookups="false" keystoreFile="D:/JavaContainer/apache-tomcat-6.0.35-x86/myKeyStore.jks" keystorePass="sslTestPwd" />
这样,就可以用https://127.0.0.1:8443访问Tomcat了。
2、在需要使用https项目的axis2.xml文件中,增加下面内容
<!--修改--> <transportReceiver name="http" class="org.apache.axis2.transport.http.AxisServletListener"> <parameter name="port">8080</parameter> </transportReceiver> <!--新增--> <transportReceiver name="https" class="org.apache.axis2.transport.http.AxisServletListener"> <parameter name="port">8443</parameter> </transportReceiver>
这样,该WebService就可以使用https进行访问了:)