SOAP - Message send failed Caused by : javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake

sumukh
Kilo Expert

Hi all,

I am trying to use the attachment creator. Trying to do a test run through eclipse (on my local system) and getting this error. I believe I have to pass the credentials or I am probably missing some configuration in my instance. Can someone please help ? Thanks.

Caught SOAPException : com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
Apr 19, 2012 5:44:17 PM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection post
SEVERE: SAAJ0009: Message send failed
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at com.nyk.servicenow.SOAPRequestGenerator.generateSOAPRequest(SOAPRequestGenerator.java:95)
at com.nyk.servicenow.SOAPRequestGenerator.main(SOAPRequestGenerator.java:50)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
... 3 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
... 4 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 12 more

CAUSE:

com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
at com.nyk.servicenow.SOAPRequestGenerator.generateSOAPRequest(SOAPRequestGenerator.java:95)
at com.nyk.servicenow.SOAPRequestGenerator.main(SOAPRequestGenerator.java:50)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
... 4 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
... 12 more

2 REPLIES 2

Jacob_Andersen
ServiceNow Employee
ServiceNow Employee

Have you tried any other SOAP methods in SN? Do you have the same problem with them? To answer you credentials question, we do not pass any credentials in the SOAP header or payload.... we use basic auth. Also, make sure that you are sending to HTTPS when consuming a SN soap web service..


sumukh
Kilo Expert

Hi Jacob,

Thanks for your reply. No, this is the first time I am using the SOAP feature. And I did try to pass the credentials in the header. How else would Service-Now authenticate the request ? And yes, I am sending it to HTTPS instance i.e. xmlns:ecc="https://myinstance.service-now.com/ecc_queue"