HomeGuidesRecipesAPI
HomeGuidesAPILog In

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 behavior 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

  1. From Manage, go to Settings > SOAP Action.
  2. Review and update the settings as required. The settings are described in the table below.
SettingDescription
UsernameUsername to authenticate the request against the web service
PasswordPassword to authenticate the request against the web service
SOAP Endpoint URLThe URL to your Web Service’s WSDL. E.g <http://www.example.com/webservice.asmx?WSDL>
MethodHTTP Method of the web request. This is set to “POST” by default.
Content TypeContent Type of the web request. This is set to "text/xml; charset=utf-8" by default.
SOAP ActionDetermine the intent of the SOAP HTTP request. E.g. ConversionRate
Access TokenAccess Token to connect to the web service.
SOAP VersionSpecify the SOAP Version of your web service, either 1.1 or 1.2. This is set to 1.2 by default.
  1. For multiple accounts:
    1. Click the New Set button to create additional accounts. For example, Sandbox and Production.
    2. Click the Set as Default button to change the default set. If the previous Default was set in Design, SmartIQ will now use the new Default values.
  2. Click Save.

📘

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>
  1. 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>
  1. Import the XML Schema sampleRequest.xsd into your SmartIQ Project and map relevant placeholders.

  2. 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 InputDescription
UsernameUsername to authenticate the request against the web service
PasswordPassword to authenticate the request against the web service
SOAP Endpoint URL (mandatory)The URL to your Web Service’s WSDL.
MethodHTTP Method of the web request. This is set to POST by default.
Content TypeContent 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 TokenAccess Token to connect to the web service.
SOAP VersionSpecify the SOAP Version of your web service, either 1.1 or 1.2. This is set to 1.2 by default.
Custom HeadersProvide custom headers for the SOAP HTTP request.
  1. 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 OutputDescription
Response BodyWeb service response body.
Response CodeWeb Service response code.

For scenarios where the Body returns an xml or json payload, use the Data Parse Action to extract specific values. Data Parse Action