Search

 

Module: Editor

Version: 4.3.0 +

Category: DataStore

 

Description

With the VisionReference 'StoreData' it is possible to store XML-data in a Vision Database. StoreData for example can be used to facilitate a visitor of your Futurama website to store information he wants to use in a next session. For example user input that you integrate within your website.

Parameters

Person:

The PersonKey (see here for more information) to which the DataItem must be bound (optional value, leave empty if it has not to be bound to a person)

XML:

The data to store

DataSet:

The name of the dataset to store this data in

Description:

A small description of the DataItem's content (maximum number of characters is 40)

ParentID:

The DataItem identifier for a possible parent DataItem (use the value '0' if no parent is required)

ExistingDataItemID:

The DataItem identifier for an existing DataItem to be replaced (use the value '0' if the DataItem is new

Response

Format

The response XML of the VisionReference looks like:

<response xmlns="http://www.actuit.nl/futurama/vision/service/response/1.0">
	<resultcode code="00000" success="true">
		<description>Success</description>
	</resultcode>
	<result></result>
</response>

Within the Result element you find the result of your VisionReference webservice call. Use soapUI to get a quick overview of the responses (see the paragraph 'Example soapUI message').

Return codes

The following return codes can be encountered:

  • 00000 - GeneralSuccess: The operation completed successfully
  • 01000 - GeneralFailError: The operation caused an error. See the error log of the Vision Management Site for more details.
  • 01999 - GeneralFailError: The operation caused an error. See the error log of the Vision Management Site for more details.
  • 51002 - DataStoreSaveErrorXMLNotConformingToSchema: The XML data does not conform to the schema of the DataSets DataType
  • 51003 - DataStoreErrorPersonDoesNotExist: The selected person does not exist
  • 51004 - DataStoreInvalidEncryptionSettings: The dataset contains invalid encryption settings
  • 51005 - DataStoreDataSetNotFound: Could not find the dataset.
  • 51006 - DataStoreInvalidParentID: The provided parentID is invalid
  • 51009 - DataStoreCyclicHierarchyError: Cyclic hierarchies are not allowed
  • 51101 - DataStoreItemNotAvailable: The dataitem could not be found/retrieved

Example soapUI message

In the preceding paragraph the parameters of the VisionReference are listed. The values of these parameters are used by Futurama to compose an XML-message. With soapUI it is possible to see the responses depending on the values of the parameters. Below you find an example of an XML-message. This example can be used in your soapUI project to test the connection with Vision and to see the response for a certain combination of parameters.

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.actuit.nl/futurama/vision/service/header/1.0" xmlns:ns1="http://www.actuit.nl/futurama/vision/service/request/1.0">
	<soapenv:header>
		<ns:document path="\\servername\path\datastore.xml" version=""/>
		<ns:futurama path="\\servername\path\futurama" version=""/>
	</soapenv:header>
	<soapenv:body>
		<ns1:request module="DataStore" version="1.0" method="StoreData">
			<ns1:parameter name="PersonID" value="12345" type="System.String"/>
			<ns1:parameter name="XML" value="escaped XML-data" type="System.String"/>
			<ns1:parameter name="DataSetName" value="DataSet 1" type="System.String"/>
			<ns1:parameter name="Description" value="This is DataItem1" type="System.String"/>
			<ns1:parameter name="ParentID" value="0" type="System.Int32"/>
			<ns1:parameter name="ExistingID" value="0" type="System.Int32"/>
		</ns1:request>
	</soapenv:body>
</soapenv:envelope>

Beware that in a soapUI message the XML has to be escaped. See for example http://www.freeformatter.com/xml-escape.html how you can escape XML.

Within the Header element you find an element 'Document' and an element 'Futurama'. For these elements you have to fill in the path of the Document and the Futurama respectively you also configured in the Apps and Futuramas tab of the Vision Management Site. Within the Request element you find the parameters for this VisionReference. By changing the values of these parameters you can execute different webservice calls.

Encrypt dataitems

It is possible to encrypt the dataitems. Encrypting is recommended when storing sensitive user data. Futurama Vision automatically encrypt the XML if the Dataset you provide as argument to StoreData is configured for encryption in the Futurama Vision Management Site.

See Futurama Vision - Data for information how to configure encryption. Note that in the StoreData VisionReference the input does not have to encrypted. This will be done automatically by Futurama Vision after the VisionReference is executed. 

Storing large XML

When large XML files (more than 64kb in size) must be stored, the Vision configuration must be altered to facilitate this functionality. In the configuration file of Futurama Vision an extra section must be added. See the configuration page of Futurama Vision for these settings.

Related Topics

- DeleteDataItem: for deleting a single DataItem

- DeleteDataItemHierarchy: for deleting a hierarchial tree with DataItems

- DeleteDataItems: for deleting all the DataItems for a person, or deleting all the DataItems in a certain DataSet

- GetDataItem: for getting the content of a single DataItem

- GetDataItemHierarchy: for getting the full hierarchy of s DataItem and its children

- GetDataItems: for getting the DataItems from a person, or the DataItems from a certain DataSet

- Futurama Vision – Data : More information on Vision data, and the encryption of this data

External Links

- http://www.freeformatter.com/xml-escape.html: Website to escape XML, to use this in a soapUI message

Feedback

If you have any questions about this subject or if you want to provide us feedback please send us an e-mail.

Updated: 2017-11-21