Creating a Web Service Connection

To create a Simple Object Access Protocol (SOAP) or REpresentational State Transfer (REST) web service connection, navigate to the Connections tab of the Testing Settings view and click the green plus sign icon:

how to create a simple web service connection with SOAP or REST

Give the Connection a name then select Connection Type: Generic Web Service. Select a sub-type of Rest Web Service or Soap Web Service.

If you are to create a web service connection (REST Connection), move on to the next section, or if you are setting up a SOAP Connection, skip ahead to SOAP Connections.

REST Connections


There are six types of REST Connection available (as of version 1.9.7 and later):

  1. No Authentication: This is a curated list of APIs which do not require usernames, passwords, access tokens, signing, accept-headers, or anything more complicated than putting a URL in a browser.
  2. Basic Authentication: In the context of an HTTP transaction, basic access authentication is a method for an HTTP user agent to provide a user name and password when making a request.
  3. Api Key: To be used in cases where the user needs an API Key to process a REST request
  4. Oauth(Client Credentials): This is one of 2 Oauth flows for processing a REST request. In this scenario, the user will need a URL, along with a Client Id and Client Secret, to process the request.
  5. Oauth (Password): This is one of 2 Oauth flows for processing a REST Request. In this scenario, the user will need the above details (URL, Client Id and Client Secret) in addition to Username, Password and Authorize URL, to process the request.
  6. AWS Authentication (Provar version 1.9.7 and later): For AWS Authentication using AWS Signature Version 4. In this scenario the user will need a URL, along with an Access Key, Secret Key, AWS Region and Service Name.

Click on the relevant REST Connection Type above and follow the steps in the relevant section.

No Authentication REST Connection


For a No Authentication Connection, we just need to provide the basic domain URL, for example http://services.groupkt.com.

Once the Connection is saved, it will appear as follows:

screenshot of no authentication REST connection

Refer to Invoking the Connection for more information on using this Connection in a Test Case.

Basic Authentication REST Connection


For a Basic Authentication Connection, we need to provide the Resource URL with a Username and Password.

Once the Connection is saved, it will appear as follows:

Refer to Invoking the Connection for more information on using this Connection in a Test Case.

API Key REST Connection


For an API Key Connection, we need to provide the Resource URL and the API Key.

Once the Connection is saved, it will appear as follows:

sample API Key REST Connection

Refer to Invoking the Connection for more information on using this Connection in a Test Case.

OAuth (Client Credentials) REST Connection


For an OAuth (Client Credentials) Connection, we need to provide the Resource URL, Client Id and Client Secret to create a web service connection.

For Internal (Salesforce) APIs, you can find the Client Id and Client Secret via Setup > Build > Apps.

For example:

OAuth (Client Credentials) REST Connection

Once the Connection is saved, it will appear as follows:

OAuth (Client Credentials) REST Connection in test runner

Refer to Invoking the Connection for more information on using this Connection in a Test Case.

OAuth (Password) REST Connection


For an OAuth (Password) Connection, we need to provide the Resource URL with Client Id, Client Secret, User, Password and Authorized URL.

Once the Connection is saved, it will appear as follows:

Move on to Invoking the Connection for more information on using this Connection in a Test Case.

AWS Authentication Connection using AWS Signature Version 4 (Provar versions 1.9.7 and later)


For an AWS Authentication, we need to provide the URL, Access Key, Secret Key, AWS Region and Service Name. (Note that this option is available in Provar versions 1.9.7 and later).

For example:

sample of AWS Authentication in Provar

Once the Connection is saved, it will appear as follows:

screenshot of AWS Authentication after being saved

Refer to Invoking the Connection for more information on using this Connection in a Test Case.

SOAP Connections


For a SOAP Web Service Connection, we need to provide the WSDL location. The WSDL is defined at the SOAP Connection level so that it doesn’t need to be referenced continuously throughout the Test Case.

To locate the WSDL for the Web Service, log into Salesforce then choose Setup > Develop > Apex Classes.

Locate the correct Apex Class and right-click on the WSDL link. Choose Save link as to download the xml file.

how to locate the correct Apex Class on the WSDL link

Save the downloaded xml file in the wsdl directory inside your Provar project (you may need to create this directory in Provar if it doesn’t already exist):

screenshot of saved CasesWebService.xml file in wsdl directory

Note that it is recommended but not mandatory to store the WSDL in the Provar Project. If there is a good reason to store it elsewhere, it can still be referenced in the same way in the Wsdl Location.

Then define the Wsdl Location in the SOAP Connection. This can be done using a relative path or an absolute path, as below:

defining the Wsdl Location in the SOAP Connection

defining the Wsdl Location in the SOAP Connection

Once the Connection is saved, it will appear as follows:

screenshot of after saving the Wsdl Location in the SOAP Connection

Review Provar on G2
Documentation library

Other available resources

Looking for something different?

We use cookies to better understand how our website is used so we can tailor content for you. For more information about the different cookies we use please take a look at our Privacy Policy.

Scroll to Top