Serialization and De-serialization of the XML

Because it is not possible to send plain XML inside the SOAP protocol, the < and > symbols in the XML file must be replaced by &lt and &gt respectively. This prevents the computer from executing these commands, and will allow you to see the symbols in the actual code. Additionally, any strings will also need to be parsed using [![CDATA]] in order to prevent the server from reading these strings as commands. This process is called "serialization" of the XML.

In order to decode or de-serialize the getAllWorkflowsOperation response XML, upon receiving the getAllWorkflowsOperation response, the &lt and &gt symbols will then need to be replaced with < and > respectively. This process is usually automatic when the RoboticAutomationService web service is referenced from the Integrated Development Environment (for example, for a web reference in Visual Studio, you only need to read this as a string).

Use a standard .Net/Java XML serialization API (such as XmlSerializer in .Net) to serialize and de-serialize the XML. If you are using third-party software, you will need some type of serializing software, such as those found online. Remember to replace both the &lt and &gt symbols as well as to add the CDATA tag (note that the standard XML API serializer does these actions automatically).

Here is a sample of a workflow definition before de-serialization/decoding:

Figure A-3: Sample Workflow Definition Before Decoding

Here is the same sample workflow definition after running the XML through de-serialization or decoding:

Figure A-4: Sample Workflow Definition After Decoding

After de-serialization/decoding, the workflow definition contains the following fields:

name: The name of the workflow. This value is the same as the ID parameter described in Workflows Operation.

display_name: The display name of the workflow.

description: A description of the workflow.

WF_parameters: A list of parameters that the workflow expects to receive.

For each of these parameters, the following values are provided:

name: An internal name used for identification purposes.

display_name: The display name of the parameter.

is_list: When true, the parameter represents an array, where each element of this array is of the type specified in the type field (see above). When false, the parameter is a single field.

description: A description of the parameter, which can be any text.

The workflow_definition.xsd file serves as a reference and describes the rules that apply when defining the content for the definition parameter, including the fields that it contains. The following figure shows the contents of the workflow_definition.xsd file supplied by NICE:

Figure A-5: Contents of the workflow_definition.xsd File