Today I stumbled onto interesting soapUI quirk, involving a combination of mock services, SOAP 1.2 and multipart message definitions.

In essence, the soapUI mock service will always return an HTTP 500, with the following response:

Sigh.

Thankfully some legend known as fyerf posted a solution on the smartbear community forums.

It turns out the soapUI isn’t so clever when it comes to parsing multipart message definitions, such as:

Take note of the placement of the <s:body> in the <wsdl:input>…its sitting at the bottom, beneath the other part definitions. So what? Well it turns out soapUI’s mock generator goes insane with this.

It expects the body part to be declared and bound first, in order for it to construct the mock correctly. To help it out, move it to the top, like this:

And the mock should start behaving as expected.

Here’s my complete WSDL definition that triggered this behaviour (exluding schema includes).