Forum Discussion
Yes, in the mock service, when I create a response, it allows me to create a normal response or a fault response.
My question is, how do I specify which type of fault that is, there are dozens of fault types. According to the documentation, there is supposed to be an option in the fault window to specify which fault type you want. But it's not there. I am current on my install of SOAP UI.
You can only specify the status code for a REST mockservice. See attached. (It should be blue, not green)
SOAP specification doesn't allow for status codes.
When the server returns a SOAP fault:
For SOAP 1.1, the status code must be 500 “Internal Server Error”.
For SOAP 1.2, it varies based on the type of the SOAP fault.
For env:Sender, the status code is 400 “Bad Request”,
but for anything else it is 500 like SOAP 1.1.(https://blogs.msdn.microsoft.com/nathana/2011/03/31/deciphering-a-soap-fault-with-a-400-status-code/)
Your SOAP version should be automatically detected from your WSDL. You can also change the SOAP version at the Binding level in your project.
Ok. Thanks for the post and information, that is very useful information.
The client I am interfacing to, returns fault codes as if they were status codes.
For example:
a 200 is obviously good, but they will return different status codes, based on the quality of the response.
So a 2xx means the data is good, but is expiring soon.
A 2yy means the data is good, but has outstanding claims.
A 2zz means the data is good, but is on hold
(obviously, the xx, yy, and zz stand for numeric values, but I don't have them in front of me right now).
Where most SOAP servers will return a data related status code inside of the data, this particular one ,decided to put their data related status codes as http status codes.
I'll be the first to say I think that is bad programming practice, but that's the situation that I am dealing with.
I was simply trying to make SOAP responses in Soap UI that mimick the data packets that will be coming from the vedor, so that I can put together good ETE testing of all of the conditions that we expect to get.