web services - Java Secure Webservice -
I am trying to convert an http webservice to https I added the tag to the webservice
< Pre> @ security dimension (value = "jboss -ssl")
and
@WebContext (contextRoot = "/ path / one" // // already added urlPattern = "/ X", // here already authMethod = "Client-CERT", // Added TransportGuarantee = "Confidential") // Added
But when my customer tries to connect to https: // hostname: 80 / path / to / ws
, I get an exception:
Reason by: java.io .IOException: The HTTPS hostname is incorrect: may & lt; Hostname & gt;
.
(The whole thing shown below) I suspect that it is to be used with certificates which is being used, I think I have to use Java Kettle to solve this problem. . If someone can verify for me then he will be very much appreciated
javax.xml.soap.SOAPException: java.io.IOException: org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal (SOAPConnectionImpl.java:115) the message could not be transmitted to org.jboss.ws.core.soap.SOAPConnectionImpl.call com.alcatel.tpapps.common.utils.SOAPClient.execute (SOAPClient.java:146) to ( SOAPConnectionImpl.java:66) at com.alcatel.tpapps.common Because of utils.SOAPClient.main (SOAPClient.java:233): java.io.IOException: no message sent to org.jboss.ws.core.client.RemotingConnectionImpl.invoke (RemotingConnectionImpl.java:192) on org.jboss could org.jboss: .ws.core.client.SOAPRemotingConnection.invoke on org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal (SOAPRemotingConnection.java:77) (SOAPConnectionImpl.java:106) ... 3 more because of. Remoting.CannotConnectException: The HTTP client can not connect to the invite. The HTTPS hostname is incorrect: & lt; Hostname & gt; should be there. Org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection at (HTTPClientInvoker.java368) org.jboss.remoting.transport.http.HTTPClientInvoker.transport (HTTPClientInvoker.java:148) org.jboss.remoting.MicroRemoteClientInvoker .invoke on org.jboss.remoting.Client.invoke (MicroRemoteClientInvoker.java:141) (Client.java:1858) on org.jboss.ws on OrgkjbosskremotingkClientkinvoke (Clientkjava:7l8) K Core.client.RemotingConnectionImpl.invoke (RemotingConnectionImpl.java:171) ... 5 and reason: java.io.IOException: HTTPS hostname is incorrect: may be & lt; Hostname & gt; On sun.net.www.protocol.https.HttpsClient.checkURLSpoofing (HttpsClient.java:490) on sun.net.www.protocol.https.HttpsClient.afterConnect (HttpsClient.java:415) on sun.net.www.protocol Sun.www.protocol.http.HttpURLConnection.getOutputStream (httpURLConnection.java:857) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream (HttpsURLConnectionImpl) .java: 230) org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection (HTTPClientInvoker.javamore8888) on ... 10 more
update 1
I Tried the following but had no effect on the exception:
hostname [user name: / path / two / path] [525]% keytool -genkey -k Eystore server.keystore -alias Hostname ... ...
Update 2
Actually it is not certain that what I did in Update 1 was correct Because I did not specify that host name ..
Update 3
I specified the host name as the nickname
and
the name of your organizational unit What is it? [Unknown]: hostname
but it still has not solved my problem. Is there a specific way of adding the host name?
I am sure this post resolves this issue, but it is very understandable to understand. Come back to this
This solution is also useful
< P> import javax.net.ssl.HostnameVerifier; Import javax.net.ssl.HttpsURLConnection; Import javax.net.ssl.ssl session; Hostname viewer hv = new hostname description () {verify public boolean (string urlHostName, SSL session session) {System.out.println ("Warning: url host:" + urlHostName + "vs. + + session.getPeerHost ()); Back true; }}; HttpsURLConnection.setDefaultHostnameVerifier (HV);
Comments
Post a Comment