14 years ago
This must be a bug. Or ... ?
I'm trying to do something very simple with SoapUI 4.0: use a project property to set the hostname for a REST service.
But no matter how I do it, it doesn't work. Details:
-) if I just set up a REST service to http://localhost:8080/rest/ and then query a resource call 'contents', all is fine.
-) so then I make a property called 'servicename' with value of (many different possibilities) 'http://localhost:8080/rest' or 'localhost:8080' or 'http://localhost/'.
-) then I make a new REST service with endpoint '${#Project#servicenmae}' and then define resources as before. No luck. In the log, I see it querying to 'localhost:8080' but to resource '/', not '/rest/contents', no matter what combination of values I put in (or using two properties one for host, one for the '/rest' part, etc.)
Soap UI seems to have a few too many smarts about URLs I notice. When I put in the hard-coded value, it pulls the host part out and then prepends the '/rest' part to the resource. When I do the substitution, no matter how I do it, that doesn't happen.
Bug?
TIA,
Will
But no matter how I do it, it doesn't work. Details:
-) if I just set up a REST service to http://localhost:8080/rest/ and then query a resource call 'contents', all is fine.
-) so then I make a property called 'servicename' with value of (many different possibilities) 'http://localhost:8080/rest' or 'localhost:8080' or 'http://localhost/'.
-) then I make a new REST service with endpoint '${#Project#servicenmae}' and then define resources as before. No luck. In the log, I see it querying to 'localhost:8080' but to resource '/', not '/rest/contents', no matter what combination of values I put in (or using two properties one for host, one for the '/rest' part, etc.)
Soap UI seems to have a few too many smarts about URLs I notice. When I put in the hard-coded value, it pulls the host part out and then prepends the '/rest' part to the resource. When I do the substitution, no matter how I do it, that doesn't happen.
Bug?
TIA,
Will