In this article Table of Contents
Table of Contents | ||||
---|---|---|---|---|
|
Warning |
---|
Breaking change for Pipelines using the SOAP Execute Snap Before the 4.25 release, the SOAP Execute Snap was used to preserve the empty XML elements in the envelope irrespective of selecting the Preserve input empty elements checkbox. After upgrading to 4.25 GA, the Snap might fail due to missing empty XML elements. In such cases, select the Preserve input empty elements checkbox to resolve the issue. If the failure persists then contact the support team. |
...
Snap type: | Write | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: | This Snap calls the SOAP endpoint using the incoming data and writes out a SOAP response.
Clicking Customize Envelope will attempt to generate a SOAP envelope based on the information defined in the properties and the selected WSDL. The action will launch the XML Editor.
In general, you will most likely always use Customize Envelope.
The envelope will be stored in the Snap after clicking OK. Further, the envelope can be exported to SnapLogic's file system using the export action or be imported from there using the import action. The Generate template action will regenerate the template, but the content of the editor must be removed prior to that. The envelope can be customized to meet specific endpoint needs. The Snap is fully configured and executable once the envelope is finalized. The generated envelope will have velocity references in it. These references (here, $session_id) will be exposed to the Target Schema column of the upstream Mapper or Structure Snap. However, any changes made by the user in the generated envelope won't be reflected to this Target Schema column. In this case, the user has to remember the references added/modified in the generated envelope to map them in the upstream Snap.
To execute a create request through an NTLM account in the SOAP Execute Snap, use the generic envelope similar to the following sample. This ensures the output is rendered as excepted. See the example for a demo on how this works.
In the upstream Mapper or Structure Snap, these references can be mapped to static values (such as 1234) or to the references exposed in the Input Schema column. We map the reference session_id in the upstream Mapper (Data) Snap in the example below. Note that the content of the editor must be saved prior to selecting the schema upstream.
How to use the default value for substitutionTo use the Default value for substitution property of the Snap:
ExampleIncoming document: Here, the session_id element doesn't exist in the incoming document. In this case, using Default value for substitution will give us the following envelope:
| |||||||||||||||||||||||||||||
Prerequisites: | None | |||||||||||||||||||||||||||||
Support and limitations: |
| |||||||||||||||||||||||||||||
Account: | This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See Configuring SOAP Accounts for information on setting up this type of account. | |||||||||||||||||||||||||||||
Views: |
| |||||||||||||||||||||||||||||
Settings | ||||||||||||||||||||||||||||||
Label* | Required. The Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||||||||||||||||||||||||
WSDL Url | Required. The URL * | Specify the URL for the WSDL.
Example: http://www.webservicex.net/stockquote.asmx?WSDL | ||||||||||||||||||||||||||||
Service Name | Required. The * | Specify the system function that has been exposed to Web-based protocols. Example: http://www.webserviceX.NET/}StockQuote | ||||||||||||||||||||||||||||
Endpoint | Required. Endpoint * | Specify the endpoint (in WSDL 2.0 terminology)/Port name (in WSDL 1.1 terminology).
Example: {http://www.webserviceX.NET/}StockQuote | ||||||||||||||||||||||||||||
Operation | Required. Operation * | Specify the operation to invoke Example: GetQuote | ||||||||||||||||||||||||||||
Timeout | Required. Timeout * | Specify the timeout for the web service call (in seconds). 0 indicates no timeout. ExampleDefault value: 0 | ||||||||||||||||||||||||||||
Encode Attribute | If selected, Select this checkbox to differentiate the attributes from XSD will be differentiated with an '@' prefix in the input schema and "at-" prefix in the template. Default value: Unselected Deselected | |||||||||||||||||||||||||||||
Default value for substitution | This value will be used for substitution for the leaf elements which are not objects and/or not enclosed in an array. If nothing is specified and Use default value for substitution is selected, an empty string will be used for substitution. | |||||||||||||||||||||||||||||
Use default value for substitution | If selected, then,you select this checkbox:
| |||||||||||||||||||||||||||||
Preserve input empty values | If selected, Select this checkbox to preserve any empty value within the input data is preserved in the SOAP request. If the you select Use default value for substitution check box is selectedcheckbox, then this field is ignored. | |||||||||||||||||||||||||||||
Include root element | If enabled, the Select this checkbox to include root element in the body or header in the keys generated in the envelope template would contain the root element in the body or header. Default value: Not selected | |||||||||||||||||||||||||||||
Trust all certificates | Select this checkbox to trust all certificates, such as self-signed certificates. Default value: Not selected | |||||||||||||||||||||||||||||
Remove illegal characters | Select this checkbox to remove illegal UTF characters based on XML 1.0 standard. | Trust all certificates|||||||||||||||||||||||||||||
Escape special characters | Select this | option to trust all certificates, such as self-signed certificates.Remove illegal characters | Removes illegal UTF characters based on XML 1.0 standardcheckbox to enable the Snap replace the XML special characters in XML template variable values with the respective character entity references (
Default value: Selected. | |||||||||||||||||||||||||||
Enable MTOM | Selecting this field enables contentSelect this checkbox to enable content processing to multipart, application/xop+xml type.
The following example shows how contents of the file, salesforce_sample.csv, are inserted into the SOAP response and what updates are required to the Snap. After selecting the Enable MTOM Processing field, the following updates to the Snap are required for successful execution:
Default value: Not selected | |||||||||||||||||||||||||||||
Output SOAP envelope | Select this option checkbox to output the whole SOAP envelope instead of just the SOAP body | |||||||||||||||||||||||||||||
WS Addressing | Creates and configures an addressing feature with the use of addressing requirements. It enables WS-Addressing, that is it supports WS-Addressing but does not require its use. It also configures to accept all the response types. Default value: Not selected | |||||||||||||||||||||||||||||
Output HTTP response headers | Select this option to output checkbox to output the HTTP headers in the response. Default value: Not selected | |||||||||||||||||||||||||||||
SSL Protocol | Advance setting, leave blank to allow Java default. | |||||||||||||||||||||||||||||
Response to null SOAP call return value * | Required. Specifies Specify an action to be taken when a SOAP call returns an empty response. The default action is Output no documents. You can handle SOAP call with an empty response in the following ways:
Default value: Output no documents | |||||||||||||||||||||||||||||
Maximum request attempts | Specifies Specify the maximum number of attempts to be made to receive a SOAP response. The SOAP request is terminated if the attempts do not result in a SOAP response. If no value specified, only 1 attempt is made before terminating a SOAP request. Default value: 3 | |||||||||||||||||||||||||||||
Retry interval | Specifies Specify the interval between two successive SOAP requests. A retry happens only when the previous attempt resulted in an exception. Default value: 2 | |||||||||||||||||||||||||||||
Success condition | An expression to match success criteria in the SOAP response. Example: (with expression toggle on) $['SOAP-ENV:Body']['ns2:orderResponse']['ns2:result'] == "success" This would match the success criteria in this SOAP response:
You can see that the user can find the SOAP output by setting Snap Execution on the SOAP Execute Snap, then seeing what comes out. You can also hook up a Mapper Snap and see the schema there. You can do that on the input view, but not the output view. | |||||||||||||||||||||||||||||
Customize envelope | Launches the XML editor which will generate a SOAP envelope based on the defined properties, WSDL URL, Service name, Port name and Operation. The editor will load an envelope if it was defined previously. The editor allows you to save SOAP envelopes in SnapLogic's file system or import existing SOAP envelopes from it. The Apache Velocity template can be used to pass dynamic values from upstream Snaps.
See https://velocity.apache.org/engine/1.7/vtl-reference.html#unparsed-content for more information. | |||||||||||||||||||||||||||||
HTTP header | This property lets you supply Use this field set to define HTTP header key-value pairs.
| |||||||||||||||||||||||||||||
Attachments | This property lets you Use this field set to add attachments. | |||||||||||||||||||||||||||||
Allow duplicate headers | Select this check box checkbox to allow duplicate headers value. If not selected, then the last value of the duplicate header key is used. Default Value: Not selected | |||||||||||||||||||||||||||||
Standardize error output | This property enables you to see Select this checkbox to view the document in error view . If selected, (a standardized error document will show up in the error view, i.e. error, )—error, reason, resolution, stack trace and original. Default value: Not selected | |||||||||||||||||||||||||||||
Route all exceptions to error view | This property when enabled lets you route Select this checkbox to route the Snap exceptions generated by WSDL Url, Service Name, Endpoint and Operation properties to the error view and successfully execute the pipeline execution. Default value: Not selected | |||||||||||||||||||||||||||||
Import WSDL documents | When selected, imported Select this checkbox to import WSDL documents are retrieved and processed. If it is not selected, the imported WDSL documents are ignored. Default value: Selected | |||||||||||||||||||||||||||||
Transfer type | The Snap uses each input document as a body of one SOAP request. There are two ways of transferring the request body to the endpoint: 'Chunked transfer encoding' or 'Calculate content length'. If 'Chunked transfer encoding' is selected and when the message size is greater than 4KB, the SOAP request will be sent using chunked transfer encoding. Otherwise, the request will not be chunked and the Content-Length header will be included in the request. If a SOAP endpoint does not support 'Chunked transfer encoding', this property should be set to 'Calculate content length'. If the endpoint responds with an error of HTTP status code "411 Length Required", the Snap automatically retries the request with 'Calculate content length' mode. Example: Calculate content length Default value: Chunked transfer encoding | |||||||||||||||||||||||||||||
Library API | This property enables Snap execution over HTTP. Use the appropriate library to utilize the latest SOAP capabilities. The available options are:
Default value: Apache CXF
| |||||||||||||||||||||||||||||
|
|
...
Here is the pipeline consisting a Mapper Snap and SOAP Execute Snap with credentials defined as Pipeline parameters.
Upon validating the pipeline, Target Schema will be defined for the Mapper. Once this is available, we can define the Target path variables from the Target Schema.
...