Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/378.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 需要使用HTTPS创建Web服务的帮助吗_Java_Security_Ssl_Https - Fatal编程技术网

Java 需要使用HTTPS创建Web服务的帮助吗

Java 需要使用HTTPS创建Web服务的帮助吗,java,security,ssl,https,Java,Security,Ssl,Https,我已经用https编写了我的Web服务。但根据要求,我应该提供认证。因此考虑使用SSL(HTTPs)。谁能帮我一步一步地将HTTP移动到HTTPs和SSL认证部分 我在服务和axis xml文件中添加了以下内容: <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslPro

我已经用https编写了我的Web服务。但根据要求,我应该提供认证。因此考虑使用SSL(HTTPs)。谁能帮我一步一步地将HTTP移动到HTTPs和SSL认证部分


我在服务和axis xml文件中添加了以下内容:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
    maxThreads="150" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS"
    keystoreFile="/root/my_workspace/server.keystore"              keystorePass="changeit"/>

<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>

8080
8443
但我不想通过HTTP访问。我如何限制


我还通过eclipse创建了WDSL请求,value标记以“
q0
”开头,response也有return标记。那么,如何避免和使用自定义的请求/响应呢?

通过SSL(即Https)进行Http连接,您需要通过提供证书(自签名或CA提供)在应用程序服务器中启用SSL。它与应用程序代码无关。请参阅应用程序服务器的文档以启用SSL。例如,这提供了有关如何在tomcat 7中配置SSL的信息

请在=>上询问此问题…您将在那里得到更好的响应,代码和错误也是如此!!我在服务和axis xml文件中添加了以下内容。是的,我接受你的回答,非常感谢。你能告诉客户如何访问hhtps页面的代码吗?好的,我没有任何现成的代码。但将帮助此示例代码访问http。但我想访问https。我还有另外一个问题,我在上个月的问题栏中提到过。