Forum Discussion

biiincheeen's avatar
biiincheeen
Occasional Contributor
14 years ago

Rest Query parameter $filter is not working in soapui

Dear soapUi experts,

I am currently trieing to test a odata REST service with soapui.

So far, everything was working fine: the Rest services replys the right data.

Now I want to limit the responsed data through the $filter query parameter. I modified the path as follows:
xxx/myservice?$filter=firstpara EQ 'firstvalue' and secondpara EQ 'secondvalue'&$format=xml&client=0

If i test it in the browser, the path is working fine and i get back only the requested data.

i implemented the path in soapui as shown in the attachment.
But for some reason, when testing the service with soapui, it still get back all the data: my filtering is ignored.

How can i use $filter when testing with soapui?
Did I implement something wrong, forget anything etc.?

Thanks a lot for your time!
  • biiincheeen's avatar
    biiincheeen
    Occasional Contributor
    It seems to be connected with the soapui conversion of $ to %24

    If i replace %24 with $ in the path it works fine.
    Is there any option, to deter soapui from converting $ into %24 or at least a way to go arround this issue?
  • maryjoz's avatar
    maryjoz
    Occasional Contributor
    Hello,

    Has anyone found a work around to this? I am having the same problem in an ODATA service I am trying to test with SoapUI.

    Thanks!
  • (this answer has also been provided here http://forum.soapui.org/viewtopic.php?f=14&t=12537&p=53381#p53381)

    The best workaround I found for including unencoded special characters is included in the attached image. Even though I checked "Disable Encoding" we still have issues with sending unencoded spaces. For that, I did not yet find a workaround. Let me know if that's a blocking issue.
    For "$filter" and question mark, we can send that parameter name in a resource section of a REST request, instead of a query string. That's highlighted in the attached image.
    I've been able to make these values dynamic with a TEMPLATE style parameter as described here - http://www.soapui.org/REST-Testing/unde ... parameters
    Do note that I had to include a dollar sign twice, since ${} format is used for our property expansion syntax - http://www.soapui.org/Scripting-Propert ... nsion.html

    Thanks,
    Michael Giller
    SmartBear Software