Skip to content

Mocking a SOAP service

Right-click a folder ▸ Add ▸ SOAP server.

Each mocked operation is a list entry:

FieldRole
SOAPActionThe header value that identifies the operation
NameThe operation’s name
Response bodyThe XML envelope returned
FaultReplies with a <soap:Fault> and an HTTP 500 status

A SOAP server item: the listening address, then two mocked operations — CreateInvoice, which returns a response body, and CancelInvoice, whose "Fault" box is ticked

An operation is chosen:

  1. first by its SOAPAction — that is the normal route;
  2. failing that by its name, compared with <soap:Body>’s first child.

That fallback is what lets you mock services whose client sends no SOAPAction header.

Mark an operation as a fault and Restorm replies with a <soap:Fault> envelope and an HTTP 500 status — exactly what a real SOAP service produces when it errors.

That is hard to provoke on a staging service, and yet it is the path your client has to know how to handle.

The SOAP server and SOAP server close actions. See Hosted servers.