This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
SOAPService

SOAPService

Top  Previous 

 

This behavior pattern implements SOAP service client. Extends SeSSimulatedObject.

 

Behavior Pattern: SOAPServiceBehavior

 

Property Summary

 

Property

Description

Getter

Setter

Credential

The HTTP Basic Authentication Credentials (if any).

GetCredential

SetCredential

Name

The name of the request operation

GetName


ResponseBodyObject

The body of the HTTP response deserialized from SOAP into a JavaScript object.

GetResponseBodyObject


ResponseBodyText

The body of the HTTP response in raw text format.

GetResponseBodyText


ResponseHeaders

Returns the list of HTTP headers returned with the HTTP response.

GetResponseHeaders


ResponseIsErrorStatus

Returns 'true 'if an HTTP error code came back from the web service.

GetResponseIsErrorStatus


Url

The URL being used to access the web service.

GetUrl

SetUrl

 

Action Summary

 

Action

Description

DoExecute

Executes a SOAP service operation, substituting any of the provided parameter values if necessary.

DoExecuteRaw

Sends a SOAP request as is.

DoVerify

Checks that a given part of response equals the expected value.

 

Property Detail

 

Credential

The HTTP Basic Authentication Credentials (if any).
Sample code:

var credential = {};

credential.UserName = "fredbloggs";

credential.Password = "MyPassword";

SeS("Operation_Name").SetCredential(credential);

 

 

Type: object

 

Accessors: GetCredential, SetCredential

 

Name

The name of the request operation

 

Type: string

 

Accessors: GetName

 

ResponseBodyObject

The body of the HTTP response deserialized from SOAP into a JavaScript object.

 

Getter Parameters:

 

Name

Type

Description

jsonPath

string

Path to a sub-object within response object. E.g. 'Body.Connection_AuthenticateResult'.
Optional, Default: Body.

info

object

Empty object that will receive error information if any. Access as info.error in a calling function.
Optional.

 

Type: object

 

Accessors: GetResponseBodyObject

 

ResponseBodyText

The body of the HTTP response in raw text format.

 

Type: string

 

Accessors: GetResponseBodyText

 

ResponseHeaders

Returns the list of HTTP headers returned with the HTTP response.
Sample code:

var headers = SeS("Operation_Name").GetResponseHeaders();

for (var i = 0; i < headers.length; i++)

{

 var name = headers[i].Name;

 var value = headers[i].Value;

}

 

 

Type: object

 

Accessors: GetResponseHeaders

 

ResponseIsErrorStatus

Returns 'true 'if an HTTP error code came back from the web service.

 

Type: boolean

 

Accessors: GetResponseIsErrorStatus

 

Url

The URL being used to access the web service.

 

Type: string

 

Accessors: GetUrl, SetUrl

 

Action Detail

 

DoExecute(method, params, headers)

Executes a SOAP service operation, substituting any of the provided parameter values if necessary.

 

Parameters:

 

Name

Type

Description

method

string

Name of a SOAP method.

params

object

JavaScript object {"name1": "value1", "name2": "value2" }. Parameter values that should be passed to the web service operation.

headers

object

Array of header name/value pairs.

 

Returns:

 

boolean: 'true' if success, 'false' otherwise.

 

DoExecuteRaw(method, body, params)

Sends a SOAP request as is.

 

Parameters:

 

Name

Type

Description

method

string

Name of a SOAP method.

body

string

SOAP xml string.

params

object

JavaScript object {"name1": "value1", "name2": "value2" }. Parameter values that should be passed to the web service operation.

 

Returns:

 

boolean: 'true' if success, 'false' otherwise.

 

DoVerify(msg, jsonPath, expectedValue)

Checks that a given part of response equals the expected value.

 

Parameters:

 

Name

Type

Description

msg

string

Message to write into the report.

jsonPath

string

Path to the given node in the response object to use as a root for comparison with the expected value.

expectedValue

object

Expected value.

 

Returns:

 

boolean: 'true' if success, 'false' otherwise.