![]() ![]() |
|
#1
|
|||
|
|||
![]()
If I use a variable {test} in the Rest Uri of the Rest Service snap-in (http://test.com/api?id={test}) then that seems to work as long as it LOOKS like a real Uri, but if I use a variable in a way that makes the Rest Uri appear like it's not a valid Uri ({test}), then I get an error "Rest Service: The RestUri is invalid". I would like to have the full Uri set as a property so is this possible?
|
#2
|
|||
|
|||
![]()
ED has this validation check
if ( url not starts with "http://") { e.add("REST Service: The RestUri is invalid."); } can you work with url like (http://{test}) otherwise ED would have to remove the validation in code |
#3
|
|||
|
|||
![]()
Anurag is correct about the URL validation.
Practically, the variables are supposed to be either the path variables or the parameters. They are supposed to have different values in real time for each execution. The Web Service server address (FQDN or IP) and resource URI are supposed to be fixed for each Rest Service task as other properties of the Rest Service task , e.g. Authentication, username, password, return data schema, etc., are fixed and valid for one server and resource URI. Even though you may use http://{test} in request URI, the Rest Task itself would not work if other properties would not work for all possible URIs. Please refer to the Help on the Rest URI of the Call Rest Service task: <LI class=li> Rest URI (mandatory) – The URI of the web service that is being invoked. The path variable or the request parameter is in the curly brackets {}. Its name should contain only alphanumeric characters. For example,
For a REST resource URI, for example, http://www.thomas-bayer.com/sqlrest/...est/CUSTOMER/2 or http://www.thomas-bayer.com/sqlrest/CUSTOMER/3, replace the exact customer number 1, 2, or 3 with a run-time parameter. Then, fill in the Rest URI value with http://www.thomas-bayer.com/sqlrest/CUSTOMER/{pathVar1}. |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|