SOAP Element
Use
Only SOAP version 1.1 is supported.
The soap element sends a SOAP (= Simple Object Access Protocol) request method with fixed parameters to a SOAP service. Results can be used in appropriate elements by selecting the soap:identifier item from the drop-down list to a condition or expression. The element is specific to Sinch Contact Pro.
SOAP results are available globally in the IVR application, even if it is placed in a parent element.
The element can be nested in the following parent elements: block, error, form, if, timeout, vxml.
It can have the following child elements: error, timeout .
Attributes for soap Element |
Description |
---|---|
Identifier |
Enter a short name or number. The name appears in the ID column, and it is used as an address when the call is transferred to this element. The identifier appears in the drop-down list of expressions with the prefix soap:, the results of the soap method are called with that expression. See the soap results section below. |
Data Source Expression |
Choose or enter the expression that defines the SOAP server. Define the expression with one of the ways:
Note:
If you define a local path, Python requires that you enter the path in quotes and you must double the backslashes in the path definition. For example "\\\\Server\\file.xxx". |
Method Name |
The called SOAP service method. |
Parameter Values |
To define parameter values as key/value pairs, enter them in Key and Value fields as expressions (use quotes), and add each pair to Python dictionary with the plus (+) button. To remove a key/value pair from the dictionary, choose the pair and click the minus (-) button. To change the row order, choose the row, and move it with the Up and Down buttons. example:
|
Query Timeout |
To define how long time the response from the SOAP server is waited for, set the number of seconds or milliseconds. |
User Name |
To use basic authentication for the connection to SOAP server, define user name and password. |
Password | |
Certificate Name |
To secure the connection to SOAP server, define the common name part of the certificate subject, issuer and store. |
Certificate Issuer | |
Certificate Store | |
Audio File Expression |
Specify a Python expression that defines the audio file played while the SOAP query is being completed. If you use one of the default paths, you can refer to your audio file with a relative path in quotes, for example 'EN\Welcome.wav'. |
Interrupt Audio Upon Completion |
To stop audio playback when the SOAP query completes, select the checkbox. |
Repeat Audio |
To play the audio file repeatedly, select the checkbox. |
Description |
Enter a description of your element; what is it planned for, its requirements and limitations. |
Audio File Path |
If you use the default central path defined in , choose one of the default paths.To define other than any of the default paths, choose the option Use Audio File Expression, and define the path with Python expression in Audio File Expression. |
SOAP Results
To get the query results for use in your IVR, use in the receiving element’s condition or expression attributes the result expression available in the drop-down list, it has the following format: soap:identifier[0].get('field','Not found').
-
soap: is the prefix for soap related result expression. This is displayed only in the drop-down list, not in the condition or expression field.
-
identifier is the text defined for Identifier attribute, for example MySoap.
-
0: If more than one result is expected, the result’s ordinal number must be defined. Enter the number in square brackets starting from 0 for the first result. If only one result is expected, number can be omitted.
-
field is the queried result field, for example Name.
-
Not found is the string that is returned if no result is found for the queried result field.
If there is a chance that SOAP query returns several answers (for example there are several directory entries with the same Name value), you can find out the number of results with len(identifier).
To call for second, third, and so on, result, define the result expression replacing the 0 number with 1, 2, and so on, for example MySoap[1].get('Name','Not found'), MySoap[2].get('Name','Not found').
Example
To define that depending on the SOAP query results of fields Name, Country, Language, there are three options that IVR can do:
-
Add a soap element, and define its Identifier to be MySoap, define also other attributes according to your need.
-
Add an if element after the soap element, and choose for the Condition attribute from the list the option soap:MySoap[0].get('field','Not found'). Edit the expression so that it appears MySoap[0].get('Name','Not found'). Define also what happens for the IVR in this first option.
-
Add an elseif element in the if element, and choose for the Condition attribute from the list the option soap:MySoap[0].get('field','Not found'). Edit the expression so that it appears MySoap[0].get('Country','Not found'). Define also what happens for the IVR in this second option.
-
Add an elseif element in the if element, and choose for the Condition attribute from the list the option soap:MySoap[0].get('field','Not found'). Edit the expression so that it appears MySoap[0].get('Language','Not found'). Define also what happens for the IVR in this third option.