Forum Discussion
1 Reply
- AlexKaras
Champion Level 1
Hi Phil,
Endpoint address is hardcoded in the WebServices test item and cannot be changed during runtime.
You may consider creation of several WebService test items for the same web service, one item per address, and create a wrapping function that will return the needed WebService test item. Then use the result of this function call instead of the WebServices.<nameOfWebServiceTestItem>... clause.
E.g. (DelphiScript pseudo-code):
//const cWSName = 'WSamisoa';
const cWSName = 'WS10_20_1_157';
function getWebService() : OleVariant;
var oWebService : OleVariant;
var strWebServiceName : string;
begin
result := evaluate('WebServices.' + cWSName);
end;
...
// instead of
// oResultset := WebServices.WS10_20_1_157.someMethod();
// use
oResultset := getWebService.someMethod();
// process resultset returned by the web service here