soapCall
Last updated
Last updated
Performs a SOAP API call using a SOAP Connector.
Will contain a single object, or a list of one (1) or more objects of the SOAP header which consist of key-value pairs to be sent as part of the request. The structure of the object should be:
Map of the key to the file path for attaching files to upload along with te body. Will contain a single object, or a list of one (1) or more objects which consist of:
The action performed if this function runs successfully.
The action performed if this function runs successfully.
In this example, we will create a connection using the soapCall function.
Drag a SOAP Connector
component into the services panel in the service page and then fill the fields.
Drag a button component to a page in the mobile designer.
Select the event press
and drag the Connector.soapCall
function to the event flow and fill in the parameter.
For the header
param change it's type to a function / subflow and put Conversion.toList
inside it, and change value1
and value2
param type to a function / subflow.
For value1
value put Conversion.toObject
inside it then add localName
, mustUnderstand
, value
as object key with Username
, false
, abcd
as it's value respectively.
For value2
value put Conversion.toObject
inside it then add localName
, mustUnderstand
, value
as object key with Password
, false
, 1234
as it's value respectively.
For the body
param change it's type to a function / subflow and put Conversion.toObject
inside it, and then add ubiNum
as object key with 1234
as it's value.
Open the preview and try to press the Button, the soap call should be visibile on the inspector network tab.
The information of the SOAP call should be returned.
connector
The Rest Connector to be used.
Text
-
-
Yes
header
An object or a list of objects of the SOAP header that will contain arbitrary key-value pairs to be sent as part of the request.
Object / List
-
-
No
mimeHeader
The key-value pair of MIME headers (equivalent to HTTP headers) to be sent along with the request.
Object
-
-
No
action
The name of the SOAP action to be called.
Text
-
-
Yes
body
The content of the SOAP body.
Object
-
-
No
attachment
The map of the key to the file path for attaching files to upload along with the body.
Object / List
-
-
No
actionNamespace
The namespace of the SOAP action to be invoked.
Text
-
-
No
sendAsMtom
To enable or disable MOM support to send the request.
Boolean
false
true, false
No
extra
The stored value that is passed to all the callbacks.
Any
-
-
No
localName
Name of the root element.
Text
Yes
namespace
XML namespace for this header element.
Text
Yes
actor
Actor name/URI for this header element. (For SOAP 1.1)
Text
No
role
Role name/URL for this header element. (For SOAP 1.2)
Text
No
relay
Option to activate relay property in SOAP header. (For SOAP 1.2)
Boolean
No
mustUnderstand
Option to activate mustUnderstand property in SOAP header.
Boolean
No
value
Value for this header. Can be a single value (scalar), an object or a list of objects. Map keys prefixed with �_� will be treated as an attribute.
Any
No
name
Optional name. If not specified, file name will be used.
Text
No
value
Contains the direct file path of the attachments.
Text
Yes
Returns the formatted information.
Object
success
Boolean value to denote whether the function was executed successfully.
Text
message
The message to print.
Text
data
Any additional message or data to print.
Text
Returns an object with the information of the SOAP call.
Object
value
The value returned after the function has been executed.
Object
Returns an object with the information of the SOAP call.
Object
errorMessage
The error message for unsuccessful SOAP call.
Text
fault
The fault associated with the error.
Object