Qorus Integration Engine®  4.0.3.p2_git
QorusInterfaceTest::CallSoapMethod Class Reference

Invokes a SOAP operation and optionally checks the response. More...

Inheritance diagram for QorusInterfaceTest::CallSoapMethod:
QorusInterfaceTest::Action

Public Member Methods

 constructor (SoapClient soapClient, string operation, auto args)
 Creates the action. More...
 
 constructor (string wsdl, string url, string operation, auto args)
 Creates the action. More...
 
CallSoapMethod expectResponse (auto expectedResponse)
 Sets the expected response to be checked by run() More...
 
 run (QorusInterfaceTest test)
 Invokes the SOAP operation specified in constructor and optionally checks the response if the expectResponse() method was called. More...
 
auto getResponse ()
 Returns the actual value returned by the SOAP operation. More...
 
hash< auto > getInfo ()
 Returns a hash of technical information about the SOAP call (raw message info and headers) More...
 
- Public Member Methods inherited from QorusInterfaceTest::Action
 constructor ()
 creates the object
 

Detailed Description

Invokes a SOAP operation and optionally checks the response.

If the response is not known in advance:
exec(new CallSoapMethod("wdsl file name", "service url", "SOAP operation name", ("arg1": "value")).expectResponse(("retVal1": 8)));
If the response is not known in advance:
any response = exec(new CallSoapMethod("wdsl file name", "service url", "SOAP operation name", ("arg1": "value"))).getResponse();
# process the response

Member Function Documentation

◆ constructor() [1/2]

QorusInterfaceTest::CallSoapMethod::constructor ( SoapClient  soapClient,
string  operation,
auto  args 
)

Creates the action.

Parameters
soapClientthe SoapClient instance to use for invoking the operation
operationthe name of the SOAP operation to invoke
argsthe arguments to the operation

◆ constructor() [2/2]

QorusInterfaceTest::CallSoapMethod::constructor ( string  wsdl,
string  url,
string  operation,
auto  args 
)

Creates the action.

Parameters
wsdlthe name of the WSDL file
urlthe URL of the server
operationthe name of the SOAP operation to invoke
argsthe arguments to the operation

◆ expectResponse()

CallSoapMethod QorusInterfaceTest::CallSoapMethod::expectResponse ( auto  expectedResponse)

Sets the expected response to be checked by run()

Parameters
expectedResponsethe expected response
Returns
self for chaining

◆ getInfo()

hash<auto> QorusInterfaceTest::CallSoapMethod::getInfo ( )

Returns a hash of technical information about the SOAP call (raw message info and headers)

Returns
a hash of technical information about the SOAP call (raw message info and headers)

◆ getResponse()

auto QorusInterfaceTest::CallSoapMethod::getResponse ( )

Returns the actual value returned by the SOAP operation.

Returns
the actual value returned by the SOAP operation

◆ run()

QorusInterfaceTest::CallSoapMethod::run ( QorusInterfaceTest  test)
virtual

Invokes the SOAP operation specified in constructor and optionally checks the response if the expectResponse() method was called.

Parameters
testthe QorusInterfaceTest executing this action

Implements QorusInterfaceTest::Action.


The documentation for this class was generated from the following file: