Changing Data Types
  • 16 Nov 2022
  • Dark
    Light
  • PDF

Changing Data Types

  • Dark
    Light
  • PDF

Article summary

Scenario

Every system can require data to be input in a different manner. So, the adapter needs to be able to support changes in the data format of the request information being sent to the other system, as well as handling different formats of the response being sent from the other system.

In the Endpoint Configuration for the adapter (/adapter-home-dir/entitiesz/.system) in the action.json file, the requestDatatype field will handle how the request data should be formatted when being sent to the other system. The responseDatatype field will handle letting the adapter know how the response data will be formatted.

Types of Request Data Supported

Option Description
JSON The other system wants the data to be provided in a JSON object. JSON objects are stringified before they go on the wire.
XML The other system wants the data to be provided in XML format. This usually means that the data has to be in an XML format when it comes into the adapter, as there are different headers and attributes the adapter would not know how to apply. The adapter does not alter the XML.
PLAIN The other system wants the data to be provided in a simple plain text string. The adapter would once again get the data as a string and not alter it in any way.
FORM The other system wants the data to be provided as a form data object. The adapter will take the data provided and convert it to the form format.
URLENCODE The other system wants the data to be provided in a urlencoded string. The adapter will use querystring to urlencode the provided information. This will generally change the data to be username=kahsjkdh&password=ahdahjd. The data will still be sent in the payload.
URLQUERY The other system wants the data to be provided in a urlencoded string. The adapter will use querystring to urlencode the provided information. This will generally change the data to be username=kahsjkdh&password=ahdahjd. Instead of sending the data in the payload, the data will be added to the actual uri as a query (e.g. after the ? so - ?username=kahsjkdh&password=ahdahjd .

Types of Response Data Supported

Option Description
JSON The other system returns the data in a JSON object that was stringified before being put on the wire. The response is parsed into a JSON object, put through the schema translation, and returns the resulting information.
XML The other system returns the data in XML format. The adapter does not alter the XML and just returns it as is.
XML2JSON The other system returns the data in XML format. The adapter converts the XML to a JSON object, puts it through the schema translation, and returns the resulting information.
PLAIN The other system returns the data in a simple plain text string. The adapter does not alter the text and just returns it as is.
URLENCODE The other system returns the data in a text string that is urlencoded. The adapter will reverse the urlencoding to get the data into a JSON object, puts it through the schema translation, and returns the resulting information.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.