Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SoapUI endpoint error randomly

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>
like image 954
Emmanuel Gauthier Avatar asked Apr 11 '13 14:04

Emmanuel Gauthier


People also ask

What is mocking in SoapUI?

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.

How do I create a fault response in SoapUI?

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.

Which of the following dispatch methods can be implemented for mock service responses?

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.


1 Answers

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!

like image 71
Emmanuel Gauthier Avatar answered Sep 30 '22 14:09

Emmanuel Gauthier