I don't understand something about SoapUI and his mockservice's behaviour. I'm using the client of SoapUI (testcase) and a Java EE application with JAX-RPC.
My problem is :
when I'm trying to call any webservice, from my Java Client, or the testcase of SoapUI, the mockservice return a well message at first call, and the error below at the second call, with the same call or not. But if I'm waiting, It works ...
So, I have enabled the option in SOAPui : "close HTTP connection after each SOAP request" and it works all the time...
So my question is :
"Is it a normal behaviour of the mockservice, and how to implement this with my java client ?"
Thank you all.
<soapenv:Fault>
<faultcode>Server</faultcode>
<faultstring>Missing operation for soapAction [] and body element [null] with SOAP Version [SOAP 1.1]</faultstring>
</soapenv:Fault>
A mock service imitates a real REST or SOAP API – it contains definitions for operations that clients call, receives requests, and returns simulated responses. Note: In the SoapUI documentation, mocking can also be called isolation, virtualization, or simulation. All these terms refer to the same SoapUI feature.
1) We can add one more mock response and set a dynamic response based on the request/query or send a response either in sequence or randomly. 2) To add a new mock response, right click on the mock operation and select New Mock Response. 3) Now in New Mock Response2, you can create soap fault response, if required.
SEQUENCE: this is the simplest dispatch method; responses are selected and returned in the order they have been added to the MockOperation. RANDOM: almost as simple, this dispatcher selects which response to use at random, over time all responses will have been returned the same number of times.
OK, I found a solution on the forum of SoapUI : http://www.soapui.org/forum/viewtopic.php?t=5648
It is when you have the settings flag "HTTP Settings/Logs wire content of all mock requests" set to true. => Uncheck the flag and it works fine!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With