SOAP 1.2 web service
Overview
SOAP (Simple Object Access Protocol) is an XML-based protocol for accessing web services over HTTP.
SOAP allows applications running on different operating systems to communicate using different technologies and programming languages. You can use SOAP APIs to create, retrieve, update or delete records, such as passwords, accounts, leads, and custom objects, from a server.
The SOAP 1.2 Web Service source supports batch syncs.
\
Info tab
You can find the parameters in the Info tab below (Image 1).
Values
Parameter | Description | Example |
---|---|---|
Title | Mandatory. Input a name for your data sync | SOAP 1.2 to Cinchy |
Description | Optional. Add in a description for your sync. There is a 500 character limit in thie field. | |
Variables | Optional. Review our documentation on Variables here for more information about this field. | |
Permissions | Data syncs are role based access systems where you can give specific groups read, write, execute, and/or all of the above with admin access. Inputting at least an Admin Group is mandatory. |
Source tab
The following table outlines the mandatory and optional parameters you will find on the Source tab (Image 2).
- Source Details
- Schema
Namespaces
You are required to define every Namespace present in your SOAP request, or in the SOAP response. You must define an envelope schema in the Namespace section. Use the following schema as a default:
- Name: soapenv
- Value: "http://www.w3.org/2003/05/soap-envelope"
Parameter | Description | Example |
---|---|---|
Namespaces - Name | Name of your SOAP namespace tags in request and response. | "soapenv" |
Namespaces - Value | URL describing this namespace in the response. | "http://schemas.xmlsoap.org/soap/envelope/" |
Example
In the below example, the namespace name is soap, and the namespace value is http://schemas.xmlsoap.org/soap/envelope/.
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
\\ The namespace name is soap, and the namespace value is the below URL
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<m:NumberToWordsResponse
xmlns:m="http://www.dataaccess.com/webservicesserver/">
<m:NumberToWordsResult>four million four hundred and seventy three thousand two hundred and thirty nine </m:NumberToWordsResult>
</m:NumberToWordsResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2 parameters
Parameter | Description | Example |
---|---|---|
authType | Mandatory. Select the type of authentication you wish to use in this sync: None, WSSE, Basic. | Basic |
Use Password Digest | Use only with WSSE authType and when Password Type is PasswordDigest. Otherwise, leave unchecked. | |
Request Timeout | Mandatory. Set a timeout in milliseconds. The minum value is 0, and there is no maximum value. The default value is 100 milliseconds. | 2000 |
Endpoint | Mandatory. Your SOAP 1.2 Web Service API endpoint. | |
Has Mtom Response | Required to be true if your SOAP API response contains an attachment outside the message. | |
Record Xpath | Mandatory. The Xpath to select records to extract from the SOAP response. XPath stands for XML Path Language. It uses a non-XML syntax to provide a flexible way of addressing (pointing to) different parts of an XML document. It can also be used to test addressed nodes within a document to determine whether they match a pattern or not. Record XPath should start with ‘//’ and followed by the tag name of the data. You can refer http://xpather.com/ to find out Xpath | |
Envelope Namespace | The namespace prefix for SOAP request elements. It should match one of the Name values listed in the Namespaces section above. | "soapenv" |
SOAP Body
The SOAP Body can be found under Add A Property > SOAP Body. Use this XML section to specify the SOAP body for your request.
Example:
\\ If your SOAP xml is the following:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<m:NumberToWordsResponse
xmlns:m="http://www.dataaccess.com/webservicesserver/">
<m:NumberToWordsResult>four million four hundred and seventy three thousand two hundred and thirty nine </m:NumberToWordsResult>
</m:NumberToWordsResponse>
</soap:Body>
</soap:Envelope>
\\ Then you would input the below in the SOAP Body XML section. Note that it does not include the "NumberToWordsResult" lines.
<NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
<ubiNum>4473239</ubiNum>
</NumberToWords>
The Schema section is where you define which source columns you want to sync in your connection. You can repeat the values for multiple columns.
Parameter | Description | Example |
---|---|---|
Name | Mandatory. The name of your column as it appears in the source. | Name |
Alias | Optional. You may choose to use an alias on your column so that it has a different name in the data sync. | |
Data Type | Mandatory. The data type of the column values. | Text |
Description | Optional. You may choose to add a description to your column. |
Select Show Advanced for more options for the Schema section.
Parameter | Description | Example |
---|---|---|
Mandatory |
| |
Validate Data |
| |
Trim Whitespace | Optional if data type = text. For Text data types, you can choose whether to trim the whitespace. | |
Max Length | Optional if data type = text. You can input a numerical value in this field that represents the maximum length of the data that can be synced in your column. If the value is exceeded, the row will be rejected (you can find this error in the Execution Log). |
You can choose to add in a Transformation > String Replacement by inputting the following:
Parameter | Description | Example |
---|---|---|
Pattern | Mandatory if using a Transformation. The pattern for your string replacement. | |
Replacement | What you want to replace your pattern with. |
Note that you can have more than one String Replacement
\
# Next steps
- Configure your Destination
- Define your Sync Actions.
- Add in your Post Sync Scripts, if required.
- Select Jobs > Start a Job to begin your sync.
Example
The below example uses the following SOAP data as a source.
Info Tab Configuration
This example is configured with the following set of variables:
Label | Value |
---|---|
numeric_value | SOAPNumericValue |
ns | SOAPns |
endpoint | SOAPEndpoint |
calc | Credential |
Source Tab Configuration
This example is configured with the following values in the Source Tab:
Namespaces
Name | Value |
---|---|
m | http://www.dataaccess.com/webservicesserver/ |
soap12 | http://schemas.xmlsoap.org/soap/envelope/ |
Connection
Parameter | Value |
---|---|
Auth Type | None |
Request Timeout | 100 |
Endpoint | @Endpoint |
Has Mtom Response | False |
Record Xpath | //m:NumberToWordsResponse |
Envelope Namespace | soap12 |
Schema
This example uses a range of column types.
Column 1
Parameter | Value |
---|---|
Name | ./m:NumberToWordsResult |
Alias | Text Value |
Data Type | Text |
Content Type | Text |
Column 2
Parameter | Value |
---|---|
Name | Numeric Value |
Formula | @Numeric_Value |
Data Type | Number |
Column 3
Parameter | Value |
---|---|
Name | Calculated Column |
Formula | @calc |
Data Type | Text |
Column 4
Parameter | Value |
---|---|
Name | Conditional Calculated Column |
Data Type | Text |
If | ./m:NumberToWordsResult is NOT NULL |
Then | ./m:NumberToWordsResult |
Default Expression | [Numeric Value] |
Column 5
Parameter | Value |
---|---|
Name | JS Calculated Column |
Data Type | Text |
Script | See code block below |
function calc(currentRecord) {
if (currentRecord['Numeric Value'] ==300) {
return currentRecord['Numeric Value'];
} else {
return 'No numeric value';
}
}
SOAP Body
<NumberToWords xmlns="http://www.dataaccess.com/webservicesserver/">
<ubiNum>@numeric_value</ubiNum>
</NumberToWords>