Announcement Announcement Module
Collapse
No announcement yet.
javax.net.ssl.SSLPeerUnverifiedException using HttpComponentsMessageSender Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • javax.net.ssl.SSLPeerUnverifiedException using HttpComponentsMessageSender

    I am trying to use the HttpComponentsMessageSender with the HttpClient 4.0; and getting the following error while trying to call a secure webservice.

    Code:
    Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    	at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
    	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
    	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
    	at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150)
    	at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
    	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575)
    	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
    	at org.springframework.ws.transport.http.HttpComponentsConnection.onSendAfterWrite(HttpComponentsConnection.java:119)
    	at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:47)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:581)
    	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:544)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:496)
    The same call works fine when using CommonsHttpMessageSender which supports HttpClient 3.1.
    The current implementation using the CommonsHttpMessageSender is returning the success response back but while trying to use the HttpComponentsMessageSender the SSL error is encountered.

    Any pointers would be appreciated.
    Last edited by ritzy344; May 30th, 2012, 04:02 PM.
Working...
X