Communicating with a Third Party Service Using JSON and WSDL Actions

To communicate with a Third Party Service using JSON and WSDL Actions the third party provider will need to have a SOAP based API with a public wsdl url and one or many of the returns need to be JSON encoded.

Creating a WSDL action

Start this process by bringing up the action manager where you want the Third Party communication actions to be attached, for example a link click or field save trigger. Add and action of the type WSDL and in the first parameter enter the public wsdl url provided the by the Third Party Provider. After the platform communicates with the Third Party Server you will be shown the actions that can be performed by the Third Party Provider and what inputs are needed for each function.

There are two ways that a Third Party Provider might use JSON strings one as an input and one as the return value. If the provider needs JSON encoded input you will likely need a multiple part field that uses the same keys and the json object the provider needs. For example if one of the inputs is {“user_name”: “uname”,“password”: “abc123”} then the multiple part field will have two parts with “user_name” and “password” as the storage labels. You would then use the FIELD_TO_JSON in the wsdl action to convert the multiple part field into the appropriate json in the expression used to provide the parameter value.

If the provider provides JSON encoded strings as the return value you will need at least two fields to receive the value. The first field is a simple long text field that will receive the raw JSON encoded sring. The second field would be a multiple part field with the same keys as the JSON encoded string. So for example if the function returns {“status”: “success”, “message”: “”} the multiple part field will need two parts with “status” and “message” as the storage labels. Then for example on post field save of the text area that receives the raw JSON string you could add a save value action that uses the JSON_TO_FIELD expression function to convert the JSON into the multiple part storage format and save it in the muliple part field. You can then use the parts of the field in later action to read the values.

best practices - third party communication with json.txt · Last modified: 2016/09/14 18:19 (external edit)
Copyright WorkXpress, 2024