notoon
notoon

Reputation: 41

SoapUI REST Mock Service with SSL

I'm having an issue with SoapUI 5.0.0. while trying to Mock a RESTFul service using SSL. Everything works fine if I don't use SSL at all.

In SoapUI preferences :

In the mock service editor :

In the mock action editor :

What I'm doing then is creating new REST service from URI with the following parameters :

When I start the mock and call the request i get the following response generated by SoapUI instead of my mock content :

<html>
   <head>
      <meta content="HTML Tidy for Java (vers. 26 sept. 2004), see www.w3.org" name="generator"/>
      <title/>
   </head>
   <body>
      <p>There are currently 1 running SoapUI MockServices</p>
      <ul>
         <li>
            <a href="/resource?WSDL">Mock</a>
         </li>
      </ul>
      <br/>
      <br/>
   </body>
</html>

Do you guys have an idea ?

Upvotes: 3

Views: 8641

Answers (2)

derkh
derkh

Reputation: 21

Setup the SoapUI REST Mock using HTTP, then run a MockServer Proxy (http://www.mock-server.com/) ahead of it to expose an HTTPS endpoint. If you need to simulate a corporate firewall, start another MockServer to act as the corporate proxy!

eg.

SoapUI Mock on HTTP port 8003

MockServer Proxy on HTTPS port 8002, redirects to HTTP on port 8003

MockServer Proxy on HTTPS port 8001, redirects to HTTPS on port 8002 (simulates corporate proxy)

MockServer generates SSL certs or .jks which need to be added to your client application truststore to allow connection.

Upvotes: 2

Bryji
Bryji

Reputation: 1306

Unfortunately SSL is only implemented for SOAP mock services, not REST. There is a feature request for the latter. See: http://forum.soapui.org/viewtopic.php?f=2&t=25160

Upvotes: 2

Related Questions