WebServices Object

Applies to TestComplete 15.65, last modified on July 17, 2024
Testing web services with TestComplete is obsolete. We recommend that you use ReadyAPI, another SmartBear's automated testing tool for SOAP and REST web services.
If needed, you can run ReadyAPI tests from TestComplete.


The WebServices object lets you work with web services added to the Web Services collection of your TestComplete project.

The Web Services collection and its items

The 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.

JavaScript, JScript

function Test()
  var str = WebServices.SampleWebService.HelloWorld();


def Test():
  str = WebServices.SampleWebService.HelloWorld();


Sub Test
  Dim str

  str = WebServices.SampleWebService.HelloWorld
  Log.Message Str
End Sub


procedure Test;
var str;
   str := WebServices.SampleWebService.HelloWorld;

C++Script, C#Script

function Test()
  var str = WebServices["SampleWebService"]["HelloWorld"]();

See Also

About Testing Web Services
About Testing Web Services
About Web Service Checkpoints

Highlight search results