Ton636
12 years agoContributor
(Res) Bug using %7C in template parameter plus query param
(just moving to the bugs forum since this didnt receive a reply in support)
Hi,
I think I have found a bug in 4.5.1 (it also seems present in 4.5.0). But I might be doing something inherently wrong... I have an api where a particular call expects a template parameter in the form 1|1 and then some query parameters. I already know I need to urlencode the | otherwise it wont work... but if I send 1%7C1 as well as a query parameter, soapUI seems to ignore the query parameter entirely. The response from the API confirms that it never received any query parameters. If all I do is change that 1%7C1 to , say 1, then the query parameter is sent... I actually found a workaround (I consider it a very nasty hack... but whatever works) by appending any query parameters I want to send, to the value for the template parameter! So instead of sending 1%7C1 I will send 1%7C1?myqueryparam=somevalue
I have created a mini project to demo what I mean and will attach it. There is just one API resource (a dummy one of course) with three requests. One working as expected, one wrong and one with the workaround. You can see the problem by looking at the raw request when sending each request. The wrong one doesn't have the query parameter in the raw request.
Hope that is clear enough. I've tried flipping the 'donoturlencode' setting for the template parameter, but it didnt seem to do anything.
Hi,
I think I have found a bug in 4.5.1 (it also seems present in 4.5.0). But I might be doing something inherently wrong... I have an api where a particular call expects a template parameter in the form 1|1 and then some query parameters. I already know I need to urlencode the | otherwise it wont work... but if I send 1%7C1 as well as a query parameter, soapUI seems to ignore the query parameter entirely. The response from the API confirms that it never received any query parameters. If all I do is change that 1%7C1 to , say 1, then the query parameter is sent... I actually found a workaround (I consider it a very nasty hack... but whatever works) by appending any query parameters I want to send, to the value for the template parameter! So instead of sending 1%7C1 I will send 1%7C1?myqueryparam=somevalue
I have created a mini project to demo what I mean and will attach it. There is just one API resource (a dummy one of course) with three requests. One working as expected, one wrong and one with the workaround. You can see the problem by looking at the raw request when sending each request. The wrong one doesn't have the query parameter in the raw request.
Hope that is clear enough. I've tried flipping the 'donoturlencode' setting for the template parameter, but it didnt seem to do anything.