[Res]duplicate properties in REST request
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014
10:34 AM
02-21-2014
10:34 AM
[Res]duplicate properties in REST request
Hello,
How to I configure a REST method/request to have duplicate properties, e.g.,
As you can see, property "locationIds" is included twice.
If the REST method/request cannot be configured to support this, can I build the GET command programmatically? I have tried to 'cheat' by setting the value of locationIds to "96&locationIds=33" but the ampersand and the equals symbols are replaced by their code (even though I tried to entitize them).
So, is this possible to do, and if so, how?
Sincerely,
Séverin B.
How to I configure a REST method/request to have duplicate properties, e.g.,
GET /dev/api/calendar/locations?locationIds=96&locationIds=33&startDate=01-Feb-2014&endDate=28-Feb-2014
As you can see, property "locationIds" is included twice.
If the REST method/request cannot be configured to support this, can I build the GET command programmatically? I have tried to 'cheat' by setting the value of locationIds to "96&locationIds=33" but the ampersand and the equals symbols are replaced by their code (even though I tried to entitize them).
So, is this possible to do, and if so, how?
Sincerely,
Séverin B.
14 REPLIES 14
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014
11:44 AM
02-21-2014
11:44 AM
I found out that I'm trying to pass an array of values.
Found this in a new search: viewtopic.php?t=6882
Found this in a new search: viewtopic.php?t=6882
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014
12:50 PM
02-21-2014
12:50 PM
Hello,
Did the above link work for you, or are you still having issue?
Regards,
Temil
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Did the above link work for you, or are you still having issue?
Regards,
Temil
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2014
01:46 PM
02-21-2014
01:46 PM
Hello,
The linked post refers to "a property for setting this", but I cannot see the nightly build changelog.
Can you please expand upon the various options for setting and controlling multiple values for a parameter?
Can I assign multiple values to a parameter using a properties transfer or Groovy script, and if so, how?
(Or please point me to any existing documentation / web page on this topic... I searched but found nothing.)
Thx.
Severin B.
The linked post refers to "a property for setting this", but I cannot see the nightly build changelog.
Can you please expand upon the various options for setting and controlling multiple values for a parameter?
Can I assign multiple values to a parameter using a properties transfer or Groovy script, and if so, how?
(Or please point me to any existing documentation / web page on this topic... I searched but found nothing.)
Thx.
Severin B.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
07:08 AM
02-24-2014
07:08 AM
Hi,
You can add multiple parameters with same name.
You can specify the parameter with a | character.
so locationid[] para1|para2|para3
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
You can add multiple parameters with same name.
You can specify the parameter with a | character.
so locationid[] para1|para2|para3
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
11:52 AM
02-24-2014
11:52 AM
Hi Jeshtha,
Thanks for your reply.
Can you tell me where I specify the multiple parameter? Do you have a screenshot?
I created a DataGen that returns "96|44|4" but the request looks incorrect (and fails):
Cheers,
Severin B.
Thanks for your reply.
Can you tell me where I specify the multiple parameter? Do you have a screenshot?
I created a DataGen that returns "96|44|4" but the request looks incorrect (and fails):
DEBUG:>> "GET /dev/api/calendar/locations?LocationId=96%7C44%7C4&StartDate=01-JAN-2014&EndDate=31-AUG-2014 HTTP/1.1[\r][\n]"
Cheers,
Severin B.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
01:31 PM
02-24-2014
01:31 PM
Hi,
You need to disable encoding for that parameter,
For custom encoding handling when setting a parameter value (the “Disable Encoding” setting)
http://www.soapui.org/REST-Testing/rest-resources-and-methods.html#1-adding-rest-services-resources-...
Check the attached image.
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
You need to disable encoding for that parameter,
For custom encoding handling when setting a parameter value (the “Disable Encoding” setting)
http://www.soapui.org/REST-Testing/rest-resources-and-methods.html#1-adding-rest-services-resources-...
Check the attached image.
Thanks,
Jeshtha
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
01:48 PM
02-24-2014
01:48 PM
Thanks again Jeshtha.
What else do I need to do for the parameters to be correctly processed and sent?
I get this:
I would like to get this:
Severin B.
What else do I need to do for the parameters to be correctly processed and sent?
I get this:
java.net.URISyntaxException: Illegal character in query at index 66: https://XXX.com/dev/api/calendar/locations?LocationIds=23|33|44&StartDate=01-JAN-2014&EndDate=31-AUG-2014
I would like to get this:
GET /dev/api/calendar/locations?locationIds=23&locationIds=33&locationIds=44&startDate=01-JAN-2014&endDate=31-AUG-2014
Severin B.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
02:08 PM
02-24-2014
02:08 PM
That's actually the Resource Definition, so all methods and requests below it are affected.
I worked around this by creating a new child resource for this.
The request now looks like this:
Is this a bug in SoapUI Pro 4.6.4? If not, what am I doing wrong?
SB
I worked around this by creating a new child resource for this.
The request now looks like this:
Mon Feb 24 14:07:39 PST 2014:DEBUG:Sending request: GET /dev?StartDate=01-Jan-2014&EndDate=31-Jan-2014/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/client/ HTTP/1.1
Is this a bug in SoapUI Pro 4.6.4? If not, what am I doing wrong?
SB
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2014
02:29 PM
