(我正在从堆栈溢出重新发布这个问题。如果有什么办法,我可以加入问题或只是提出问题,请告诉我。谢谢。)
我正在尝试将一个http http服务转换为https。我将标签添加到webservice中。
@SecurityDomain(value = "jbossws-ssl")和
@WebContext(contextRoot="/common/ws", // already here
urlPattern="/A2", // already here
authMethod = "CLIENT-CERT", // added
transportGuarantee = "CONFIDENTIAL") // added但是,当我的客户尝试连接到https://host:80/path/to/ws时,我得到了一个例外:
Caused by: java.io.IOException: HTTPS hostname wrong: should be <host>。
(整件事如下所示)。我怀疑这与正在使用的证书有关。我认为我需要使用java keytool来解决这个问题。如果有人能为我核实的话,我们将不胜感激。
javax.xml.soap.SOAPException: java.io.IOException: Could not transmit message
at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:115)
at org.jboss.ws.core.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:66)
at com.alcatel.tpapps.common.utils.SOAPClient.execute(SOAPClient.java:146)
at com.alcatel.tpapps.common.utils.SOAPClient.main(SOAPClient.java:233)
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:192)
at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:106)
... 3 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. HTTPS hostname wrong: should be <host>.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:368)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:148)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:141)
at org.jboss.remoting.Client.invoke(Client.java:1858)
at org.jboss.remoting.Client.invoke(Client.java:718)
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:171)
... 5 more
Caused by: java.io.IOException: HTTPS hostname wrong: should be <host>
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:490)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:415)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:170)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:288)
... 10 more我尝试了以下方法,但它对例外没有任何影响:
host[user:/path][525]% keytool -genkey -keystore server.keystore -alias host
...
...实际上不确定我在更新1中所做的是正确的,因为我不必在那里指定主机名.
发布于 2010-02-04 12:59:04
错误消息是抱怨您的端口。http通常运行在端口80上,https运行在端口443上。您正在尝试在端口80上使用https。将您的电话从
https://sco-up:80/path/to/ws至
https://sco-up/path/to/ws这将自动使用端口443进行https连接。
https://serverfault.com/questions/109226
复制相似问题