Forum Discussion

andersot's avatar
andersot
Occasional Contributor
13 years ago

SSLException when attempting to invoke HTTPS mock service

REPRO [soapUI 3.6.1]

1.) Generate a .keystore with the JDK
2.) Set soapUI SSL preferences to use this .keystore with the correct password
3.) Fire up a locally mocked version of the sample currency convertor
4.) Specify the mocked port to 8443, same as the global SSL preferences
5.) Make a client request to the HTTPS mocked service

RESULTS

SSLException when attempting to invoke HTTPS mock service

Mon Jul 18 13:36:31 CDT 2011:ERROR:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
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.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.FilterOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.writeRequest(ExtendedPostMethod.java:107)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:202)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

2 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    the error indicates that you are sending an http request - are you sure you used https in the endpoint to the mockservice?

    /Ole
    SmartBear Sweden
  • I am currently using soapUI 4.5.2. and I am in fact using "https" on the endpoint.

    Also, I followed step by step the following link:
    http://www.soapui.org/Service-Mocking/s ... h-ssl.html

    But when I change the endpoint to be: https://localhost:8442/mock

    I get the following exception:

    Tue Jul 02 08:46:27 EDT 2013:ERROR:org.apache.http.conn.HttpHostConnectException: Connection to https://localhost:8443 refused
    org.apache.http.conn.HttpHostConnectException: Connection to https://localhost:8443 refused
    at com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$SoapUIClientConnectionOperator.openConnection(SoapUIMultiThreadedHttpConnectionManager.java:321)

    PS. The mock service is running.
    .......