Web Service

Use the Web Service task to call a Rest API or a Soap Service.

Purpose

Web Service task is used to call external web services using Rest API or Soap Web Service.

Web Service Node Configuration Properties:

Web Service Task Configuration panel have 4 tabs to define properties.

General

General Tab contains general information such as title name, task id, description etc.

BusinessObject

Used to configure and map the Business Object for input and output for the node.

Web Service Parameter

Property

Mandatory

Default

Description

Web Service Type

Yes

SOAP

To choose the type of web service. There are 2 types as following: SOAP and REST.

The values for Setting are as follows.

SOAP

When SOAP is selected as Web Service Type, user must enter the information about calling the Soap Service in the SOAP panel.

Property

Mandatory

Default

Description

Source Type

Y

Url

User can choose to get WSDL definition from URL or File

use environment

N

Unchecked

If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the WSDL URL in the environment variable setup screen and choose the variable in the configuration panel.

WSDL URL

Y, when SOAP using URL.

If user chooses Url as Source Type, WSDL URL is the URL to the WSDL File location. If user chooses use environment then select the environment variable corresponding to WSDL URL.

WSDL File

Y, SOAP using WSDL File

If user chooses File as Source Type, WSDL File for Web Service to be called.

XSD File

N

If user chooses File as Source Type, Subject of WSDL file.

Operation

Y

The operation is method to be called of that service.

End Point

Y

The endpoint is the URL where that service can be accessed by a client application.

Authentication

N

Authentication credentials for HTTP authentication.

Username

N

Username for Authentication. If user chooses use environment then select the environment variable corresponding to username.

Password

N

Password for Authentication. If user chooses use environment then select the environment variable corresponding to password.

SOAP panel has a "Choose WSDL" button to upload WSDL file or a "Choose XSD" button to upload XSD file. Once the user chooses a WSDL or XSD, user can click the Get Operation button to get all possible operations from the SOAP service. Get Endpoint button is to get End Point from SOAP Service.

REST

When REST is selected as the Web Service Type, user must enter information about calling the Rest API on REST panel.

Property

Mandatory

Default

Description

use environment

N

Unchecked

If user chooses use environment checkbox, then system will display the list of environment variables for user to choose. User can set the REST URL in the environment variable setup screen and choose the variable in the configuration panel.

REST URL

Y

URL for calling Rest API. If user chooses use environment then select the environment variable corresponding to REST URL.

Http Type

Y

Operations to HTTP requests.

Accept Header

Y

Type of text that the Rest API accepts.

Content Type

Y

A Content Type is a set of text response when calling Rest API.

Authentication

N

Authentication credentials for HTTP authentication. User can choose between Basic & IAM2

Username

N

If user chooses Authentication as Basic, Username for Authentication.

Password

N

If user chooses Authentication as Basic, Password for Authentication.

Header - Key

N

Additional header information key.If user chooses use environment then select the environment variable corresponding to KEY.

Header - Value

N

Additional header information value. If user chooses use environment then select the environment variable corresponding to Value.

Add Row button is used to add more header key value to the REST service. Trash icon on right side is to remove any existing header rows.

Both SOAP and REST tabs contain an "Open Mapping Parameter" button. Clicking on "Open Mapping parameter" button redirects user to Mapping Parameter screen where user can click on Mapping Parameter Input line or Mapping Parameter Output line to map parameters for this Web Service task.

You can map the input parameter and output parameter of SOAP service using XPath mapping. Please refer below example of sample wsdl.

Now to map the xpath for each input parameter.

For field name "title" you have to create xpath for mapping parameter as follows.

Method 1:

Parameter Name : title

XPath : /Operation_in/book/title

Parameter Type : String

Method 2:

Parameter Name : title

XPath : //book/title

Parameter Type : String

Method 3:

Parameter Name : title

XPath : //title

Parameter Type : String

XPath Syntax expression

Expression

Description

nodename

Selects all nodes with the name “nodename“.

/

Selects from the root node.

//

Selects nodes in the document from the current node that match the selection no matter where they are.

.

Selects the current node.

..

Selects the parent of the current node.

@

Selects attributes.

nodename[index]

Selects the index of element.

Last updated