During the "Input parameter" and "Output parameter" steps of the data source, when adding a request/response body example, it is possible for one of the following cases to occur, which keeps it from advancing to the next step:
▪The "Parameter ID #" array entered in the example must have only one item and it must be a JSON object This problem occurs when, in the JSON that is being sent to the example body, there is an attribute of the "array" type, but it has more than one element and/or its type is not "object". Within the REST data source, only arrays that hold an object are recognized, since the entered example will be used for building the attributes.
Invalid example
|
Valid example
|
In the invalid example, both attributes (request and request2) are not valid for the component. The data source uses the attributes from a single specified object to read the attributes. Thus, there can only be one object in the list.
If your request/response body example has more than one object, simply leave only one of them within the list structure. Otherwise, if there are elements that are not objects, they will not be supported by the REST data source.
▪It was not possible to identify the "Parameter ID #" parameter type. Please add a valid value so that it is possible to identify the data type This problem occurs when a JSON attribute of the request/response body has "null" value. Since the data source uses the entered JSON to map the attributed in order to consume the data, a null type cannot be identified by the component, as it needs a clearly defined type.
Invalid example
|
Valid example
|
To solve this situation, simply define the correct type for the specified attribute. If you do not know which is the type of the attribute to be applied, it must be checked in the specification of the service to be integrated.
In the valid example, the attribute type will be identified as numeric. In the attribute value, add a value that corresponds to the desired type for the integrated service.
▪The "Parameter ID #" object must have at least one lower level This problem occurs when, in the JSON of the request/response body, there is an attribute that is a JSON object, but it does not have a lower level associated. Thus, the component cannot interpret the attribute.
Invalid example
|
Valid example
|
In the invalid example, the JSON will not be correctly interpreted by the component, since the "r1" attribute is an object without lower levels associated.
In order to solve the problem, the lower levels of the attribute with the problem must be correctly mapped. This information must be checked in the specification of the service to be integrated.
|