WebServices object lets you work with web services added to the Web Services collection of your TestComplete project.
WebServices object provides access to individual web services added to the collection by their name as it is displayed in the Project Explorer panel:
In addition, the
WebServices object has methods that let you get information about an arbitrary web service at run-time and work with SOAP requests and responses sent to and from that service.
To be able to access the
WebServices object in tests, you must have the Web Services collection added to your project. See Adding and Removing Project Items and Their Child Elements.
The following example shows how to use the
WebServices object’s properties to obtain the tested web service in script and to call a method of the tested web service.
var str = WebServices.SampleWebService.HelloWorld();
def Test(): str = WebServices.SampleWebService.HelloWorld(); Log.Message(str)
str = WebServices.SampleWebService.HelloWorld
str := WebServices.SampleWebService.HelloWorld;
var str = WebServices["SampleWebService"]["HelloWorld"]();