Forum Discussion

MikeNorrish's avatar
MikeNorrish
New Contributor
13 years ago

Changing Mock Service active WSS preset programmatically?

Hi folks,

As part of a test suite for a Web Service Proxy (IBM DataPower) I am attempting to cause the appliance to raise an error when a signature is not produced by the endpoint, or is not valid. To prove this, I am using a Mock Service under SOAP UI Pro - the test request is sent to the proxy, which routes the message back to the Mock Service. I need to verify that both valid and invalid messages are dealt with correctly by the proxy.

Is it possible, using Groovy or any other mechanism, to change the active outgoing WSS settings on a Mock Service *for a particular response* during testing without manually deselecting the "Default Outgoing WSS" in the Mock Service Properties tab before running the tests?

Thanks in advance,

Mike Norrish

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Mike,

    you can set the outgoing WSS from the MockResponse script, for example

    mockResponse.mockOperation.mockService.outgoingWss = ""

    Does that work as desired?

    regards!

    /Ole
    SmartBear Software