WebServiceCredentials Object

Applies to TestComplete 15.70, last modified on December 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.

Description

The WebServiceCredentials object provides a program interface to client and service credentials as well as service credential authentication settings for the web service that will be tested with the Web Service project element.

You obtain the WebServiceCredentials object in scripts through the Credentials property of the WebService object.

The WebServiceCredentials object provides a scripting interface to credentials of the web service under test. It contains three properties that help you configure the credential object or certificate that the client uses to authenticate itself to the service.

Members

Example

The following example demonstrates how to obtain the tested web service’s credentials object in script.

JavaScript, JScript

function WebServiceDemo()
{

  var MyWebService, Crd;

  // Obtain the web service under test
  MyWebService = WebServices.SampleWebService;
  // Call the web service's Credentials property
  Crd = MyWebService.Credentials;

}

Python

def WebServiceDemo():
  # Obtain the web service under test 
  MyWebService = WebServices.SampleWebService
  # Call the web service's Credentials property 
  Crd = MyWebService.Credentials

VBScript

Sub WebServiceDemo

  Dim MyWebService, Crd

  ' Obtain the web service under test
  Set MyWebService = WebServices.SampleWebService
  ' Call the web service's Credentials property
  Set Crd = MyWebService.Credentials

End Sub

DelphiScript

procedure WebServiceDemo();
var
  MyWebService, Crd;

begin

  // Obtain the web service under test
  MyWebService := WebServices.SampleWebService;
  // Call the web service's Credentials property
  Crd := MyWebService.Credentials;

end;

C++Script, C#Script

function WebServiceDemo()
{

  var MyWebService, Crd;

  // Obtain the web service under test
  MyWebService = WebServices["SampleWebService"];
  // Call the web service's Credentials property
  Crd = MyWebService["Credentials"];

}

See Also

WebService Object
About Testing Web Services
About Testing Web Services
About Web Service Checkpoints

Highlight search results