SOAP Action
SOAP (Simple Object Access Protocol) is a standard for encoding messages in XML (Extensible Markup Language) that invoke functions in other applications. The SOAP Action enables you to send Web Services XML-based messages over the Internet/Internet, which will extend SmartIQ s ability to communicate and inter-operate with other Web service-enabled applications over the Web.
Features
- *Easily make any HTTP SOAP request from SmartIQ
The SOAP Action lets you make any HTTP SOAP request to query external applications in real time from SmartIQ.
- Bring back the Web Service results: Response Body and Response Code.
The SOAP Action also lets you retrieve the Request Body and Response Code after an HTTP SOAP request has been made.
Configuring the connector settings
The SOAP Action exposes a number of connector settings which provide system-wide values to control behaviour or context. In many cases, these settings can be overridden when the action is used in a project.
How to view or modify connector settings
- In a web browser, navigate to the SmartIQ Manage application and log in.
- Navigate to Settings and then click the Connector Settings button at the top of the page.
- Using the Connector drop-down list, select the ‘SOAP Action’ option.
- Review and update the settings as required. The settings are described in the table below.
- Click the Save button at the top of the page.
Setting | Description |
---|---|
Username | Username to authenticate the request against the web service |
Password | Password to authenticate the request against the web service |
SOAP Endpoint URL | The URL to your Web Service’s WSDL. E.g http://www.example.com/webservice.asmx?WSDL |
Method | HTTP Method of the web request. This is set to “POST” by default. |
Content Type | Content Type of the web request. This is set to "text/xml; charset=utf-8" by default. |
SOAP Action | Determine the intent of the SOAP HTTP request. E.g. ConversionRate |
Access Token | Access Token to connect to the web service. |
SOAP Version | Specify the SOAP Version of your web service, either 1.1 or 1.2 . This is set to 1.2 by default. |
Note
Connector Settings are applied system-wide, for specific scenarios where it is required to use different credentials, please specify them directly in SOAP Action in Design.
Using the action in Design
The action uses a generated XML document from SmartIQ to be used as the Body of the SOAP request. Let's take the following request as an example:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<soap:Body>
<PersonalInformation>
<Name>John</Name>
<LastName>Doe</LastName>
<DOB>29-06-1985</DOB>
<Nationality>Australian</Nationality>
</PersonalInformation>
</soap:Body>
</soap:Envelope>
- Extract the Body xml and generate its schema
<PersonalInformation>
<Name>John</Name>
<LastName>Doe</LastName>
<DOB>29-06-1985</DOB>
<Nationality>Australian</Nationality>
</PersonalInformation>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PersonalInformation">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="Name"/>
<xs:element type="xs:string" name="LastName"/>
<xs:element type="xs:string" name="DOB"/>
<xs:element type="xs:string" name="Nationality"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
-
Import the XML Schema
sampleRequest.xsd
into your SmartIQ Project and map relevant placeholders. -
Add the Send to SOAP Service Action to your project, either on the Finish page or on a workflow transition, use the following table to configure any action attributes that you require.
Action Input | Description |
---|---|
Username | Username to authenticate the request against the web service |
Password | Password to authenticate the request against the web service |
SOAP Endpoint URL (mandatory) | The URL to your Web Service’s WSDL. |
Method | HTTP Method of the web request. This is set to POST by default. |
Content Type | Content Type of the web request. This is set to text/xml; charset=utf-8 by default. |
SOAP Action (mandatory) | Determine the intent of the SOAP HTTP request. E.g. ConversionRate |
Access Token | Access Token to connect to the web service. |
SOAP Version | Specify the SOAP Version of your web service, either 1.1 or 1.2 . This is set to 1.2 by default. |
Custom Headers | Provide custom headers for the SOAP HTTP request. |
- Use the Documents tab in Design and select sampleRequest document. this basically embeds the xml in the body of the request.
Custom Namespace
For scenarios where a custom namespace is required as part of the request, like in the following example where http://www.domain.generated.test.com/v2/account
is defined with the prefix paramns
:
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:paramns="http://www.domain.generated.test.com/v2/account">
<soap:Body>
<paramns:PersonalInformation>
<Name>John</Name>
<LastName>Doe</LastName>
<DOB>29-06-1985</DOB>
<Nationality>Australian</Nationality>
</paramns:PersonalInformation>
</soap:Body>
</soap:Envelope>
There's no need to include it in your XML document in SmartIQ The Connector will add it automatically. In other words, the xml used before will also work in this case.
Action Output | Description |
---|---|
Response Body | Web service response body. |
Response Code | Web Service response code. |
For scenarios where the Body returns an xml or json payload, use the Data Parse Action to extract spefici values. Data Parse Action
Updated over 2 years ago