A Web Service Component Keywords

This chapter provides the list of keywords used in a web service based component.

WS-SETWEBSERVICENAME

Sets the name of the application web service.

Use Case: Defines the web service to which the component’s web service request is sent. The web service name is provided in the attribute values column during the component development. This service name is appended with the WebContainerURL to form a complete WSDL URL for processing the request. The WebContainerURL has to be specified in the flow runtime configuration property file.

Usage Details Value

Keyword

WS-SETWEBSERVICENAME

Display Name

User Defined Display Name

Attribute Values

Web Service Name

WS-SETXMLELEMENT

Sets the element (Xpath) value in the web service request using either a variable or a value.

Use Case: Enables the web service creation request (XML) with the element values populated by setting each value for the defined element.

Usage Details Value

Keyword

WS-SETXMLELEMENT

Display Name

User Defined Display Name

Attribute Values

Xpath of the element

WS-SETXMLLISTELEMENT

Sets the repeating list element (Xpath) value in the web service request using either a variable or a value.

Use Case: Enables the web service creation request (XML) with repeating list element values populated by setting each value set for the defined element list. The values are provided from the test data.

Usage Details Value

Keyword

WS-SETXMLLISTELEMENT

Display Name

User Defined Display Name

Attribute Values

Xpath of the element

WS-SETVARIABLE

Sets a value to a global variable.

Use Case: Used for setting a value to a global variable used across the flow for validations or for setting XML elements. The values are provided from the test data.

Usage Details Value

Keyword

WS-SETVARIABLE

Display Name

User Defined Display Name

Output Parameters

Variable Name

WS-SETVARIABLEFROMRESPONSE

Used to retrieve the XML element value from the response and stores it in a global variable for further processing.

Use Case: Enables use of a response value, such as ID from a component, as an input to a request in another component.

Usage Details Value

Keyword

WS-SETVARIABLEFROMRESPONSE

Display Name

User Defined Display Name

Attribute Values

Xpath of the element in response

Output Parameters

Variable Name

WS-SETTRANSACTIONTYPE

Sets a value for the transaction type.

Use Case: Used to set a value to a transaction type variable used in the request XML to pass a request for specific operations, such as ADD, UPDATE, READ, DELETE, etc. The transaction type is provided from the test data.

Usage Details Value

Keyword

WS-SETTRANSACTIONTYPE

Display Name

User Defined Display Name

WS-LOGMESSAGE

Used to set custom log messages in the run results report.

Use Case: Provides the necessary extensibility to provide custom log messages for the generated results report, such as to identify the start and completion of a transaction, etc.

Usage Details Value

Keyword

WS-LOGMESSAGE

Display Name

User Defined Value

Attribute Values

Message

WS-CREATEWSREQUEST

Creates a web service request XML and stores it in the “WSDLXML” global variable.

Use Case: Enables the manipulation of the web service XML request generated before submitting it to the application for processing, giving greater flexibility in development.

Usage Details Value

Keyword

WS-CREATEWSREQUEST

Display Name

User Defined Display Name

Attribute Values

Web Service Name

WS-PROCESSWSREQUEST

Sends the web services request and receives the response from the application for the specified WSDL name.

Use Case: Posts the generated XML request from WS-CREATEWSREQUEST to the application and processes the response. This keyword performs the core process of the web services based request-response model.

Usage Details Value

Keyword

WS-PROCESSWSREQUEST

Display Name

User Defined Display Name

Attribute Values

Web Service Name

WS-STARTPOLLWS

Starts the polling of the web services request and receives the response from the application for the specified WSDL name. It takes two parameters, the first is for the total time for which polling should occur and the second is the interval between polls.

Use Case: Provides a means to run a loop to keep polling a web service for a specified time measure or till a condition is met (specified in WS-STOPPOLLWSIF).

Usage Details Value

Keyword

WS-STARTPOLLWS

Display Name

User Defined Display Name

Attribute Values

User Defined Display Name

WS-STOPPOLLWSIF

Indicates the end of the polling specified by WS-STARTPOLLWS.

Use Case: The condition to stop the poll can be specified here. The attribute takes the xpath of the element against which the condition is to be compared. The condition is specified while entering the test data. If the test data is just a string, say <val>, then polling would stop when element value is <val>.

For example, if a web service needs to be polled unless the element BatchJobId is “ED”, the attribute value should be set as the xpath of BatchJobId and the test data should be entered as “ED”.

Similarly, if polling needs to continue as long as a certain value is returned, a “!” should be prefixed to the value of test data. If we want to continue polling as long as the BatchJobId is “PD”, test data should be “!PD” (the symbol ! indicates “not equals”). Similar conditions can be set for greater than, less than, greater than equal to and less than equal to, by prefixing the test data with “>”, “<“, “>=” and “<=” respectively.

Usage Details Value

Keyword

WS- STOPPOLLWSIF

Display Name

User Defined Display Name

Attribute Values

Xpath of element