cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access content of REST MockService mockRequest

johnrix
Occasional Contributor

Unable to access content of REST MockService mockRequest

When using the REST MockService in SoapUI 5.0, all attempts to access the content of an incoming POST request are failing at present. The getRequestContent and getRawRequestData methods are both returning null from within the MockService OnRequest script. The request I am sending in contains a small JSON object and the content type is accordingly set to application/json.

Note, I am using JavaScript as the scripting language for my project.

Is there any known workaround for this issue?

Thanks,
John
4 REPLIES 4
MediaOcean_Supp
Occasional Contributor

Re: Unable to access content of REST MockService mockRequest

I have the same problem. I tried both json and xml payloads as well as various approaches in each of the "script" tabs but nothing worked.

I also used the Soap mocking examples as a guide and made any changes necessary for REST but that did not work either.

Re: Unable to access content of REST MockService mockRequest

Hi,

This was due to a bug. There is a fix available on the maintenance build. You can download it from here http://www.soapui.org/Downloads/soapui- ... uilds.html


Regards,
Shadid
SmartBear Sweden


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
grooves
Occasional Contributor

Re: Unable to access content of REST MockService mockRequest

Is there a new release planned to include this bugfix (among others)?

The last version 5.0.0 is quite old now - 2014-04-09.

 

Also, is there any workaround to this other than updating to the maintenance build?

nmrao
Community Hero
Moved:

Re: Unable to access content of REST MockService mockRequest

New Here?
Join us and watch the welcome video:
Top Kudoed Authors