Forum Discussion

cochranjd's avatar
cochranjd
Occasional Contributor
14 years ago

Hosting https in SOAPUI

I'm somewhat new to using SSL and am having some difficulty using SOAPUI to mock an https web service.

It works fine if I change the configuration of my application to look for an http endpoint, but I would like to be able to test with https so I don't have to change the config for testing, only to change it back for deployment.

Are there any good walk through, tutorials, etc. out there on how to do this, step by step?

I've tried everything I've come across, but haven't managed to get it working.

Thanks

5 Replies

  • kamahade's avatar
    kamahade
    Regular Contributor
    Did you try adding HTTP headers ?

    The username and password supplied for HTTP Basic Authentication is ultimately an HTTP header field.

    As such, each SOAP test request in soapUI can be configured with a HTTP Basic Authentication username and password.

    When the test request is run an “Authorization” header is added to the HTTP envelope that contains the SOAP request.

    You can do this through the Interface Viewer. To open the Interface Viewer, right-click on a WSDL operation in the project explorer tree on the left-hand side of the soapUI interface and choose “Show Interface Viewer”.

    This will open a screen with four tabs: Overview, Service Endpoints, WSDL Content, and WS-I Compliance. The HTTP Basic Authentication credentials are set through the “Service Endpoints” tab. For each endpoint in the list you can specify what username and password to use. Once specified, all of the test requests on the WSDL operation (the one you selected to open the Interface Viewer) using the specific endpoint will automatically use the username and password you entered.
  • cochranjd's avatar
    cochranjd
    Occasional Contributor
    Interestingly enough, when I loaded up to test something else, I noticed that now my project is successfully handling https.

    I then started on a clean machine, followed the same steps (built my project, build my keystore, set my keystore in the global settings) and was getting the error again. I then restarted my computer and when it came up, it works.

    It seems like something was preventing the correct behavior until a reboot.

    Either way, it appears to be working now!