Difference between revisions of "Workflow Task Type: Web Service - SOAP Message"

From SmartWiki
Jump to: navigation, search
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''Web Service - SOAP Message''' [[Workflow Task]] allows you to post data to another system, outside of SmartSimple. The response returned by the external system can be stored into a custom field on the object against which the Workflow was triggered.
+
#REDIRECT [[Workflows_Overview#Task_Type:_Web_Service_.E2.80.93_SOAP_Message]]
  
[[File:SOAP.png]]
+
{{DeprecatedPage}}
 
 
===Options===
 
* '''Action''': The action to called by the Web Service call (These actions are defined by the external server, and are '''not''' part of SmartSimple)
 
* '''Custom Field ID for Response''': The Custom Field ID of an [[Custom Field Type: Special - XML Data|XML]] custom field on the object that the Workflow was triggered against that the response returned by the external server.
 
* '''Endpoint''': The URL or IP address of the destination server
 
* '''Envelope Template''': The content of the Web Service message to be sent to the external service. This can contain variables related to the object the workflow is triggered against.
 
 
 
==Important==
 
If the content from the custom fields being included within the SOAP message contains certain special characters it could disrupt the XML structure, making the message unreadable by the receiving server. The l'''ess than''' symbol (<) and '''ampersand''' (&) are two primary special characters to be concerned about. When including fields that may contain those characters you should use a special wrapper so the receiving understands that they are data content and not part of the XML structure:
 
 
 
:<font size="2">&lt;![CDATA[ '''''CONTENTS''''' ]]></font>
 
 
 
For example, an '''address''' could contain ampersands, so should be included as:
 
<pre>
 
<primarycontact>
 
<firstname>@firstname@</firstname>
 
<lastname>@lastname@</lastname>
 
<address><![CDATA[@address@]]></address>
 
</primarycontact>
 
</pre>
 
 
 
* It is advisable to use CDATA for any field containing text since the contents are often unpredictable.
 
* It is also possible to sanitize the field data at the point of entry (i.e. using [[JavaScript Validation]], depending on how it is entered).
 
 
 
===Note===
 
If the response to your Web Service call contains values that you wish to store within a [[Custom Field]] on the object against which the [[Workflow]] was triggered you can connect a [[Update Custom Field Value]] Workflow Task to be the task following the '''Web Service - SOAP Message''' and use the variable syntax to pull the value from the XML Custom Field you selected to store the response to the Web Service call.
 
 
 
For example, if the [[Custom Field Type: Special - XML Data|XML]] Custom Field that stores the response (custom field ID 155255 in the image above) is called '''Web Service Response''', the variable in the [[Update Custom Field Value]] task to pull a node called '''AssignedIdentifier''' could be:
 
@xml.Web Service Response.soap:Body.AssignedIdentifier.nodevalue@
 
 
 
==See Also==
 
* [[Web Services Overview]]
 
* [[Custom Field ID|Determining the custom field ID]]
 
 
 
 
 
[[Category:Workflows]]
 

Latest revision as of 08:59, 21 July 2017


Ambox warning pn.png This article is deprecated and the information contained within may no longer be correct.