Skip to main content
Version: 2.2.1

Troubleshooting

See in the following sections the problems that you may encounter when entering the request/response body or in the consumption test and their possible solutions:

Problems when entering the request/response body​

During the "Input parameters" and "Output parameters" steps for the REST data source, when inserting an example of a request/response body, you may be faced with one of the following cases, thus being unable to move on to thenext step:

The "Parameter ID #" array , entered in the example, must contain only one item, which must be a JSON object.​

This problem occurs when, the JSON that is being entered in the example body contains an attribute of the "array" type, but said attribute has more than one element and/or its type is not "object". Within the REST data source, only arrays that contain an object in it are recognized, since the example provided will be used to assemble the attributes.

β€― Invalid example

{
"request": [1, 2, 3, 4],
"request2": [
{
"id": 0
},
{
"id": 0
}
]
}

β€― Valid example

{
"request": [
{
"id": 0
}
]
}

In the invalid example, both attributes (request and request2) are not valid for the component. The data source uses the attributes of only a specified object to read the attributes. This way, there can only be one object within the list.

If your request/response body example contains more than one object, just leave just 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.

The type of the "Parameter ID #" parameter could not be identified. Please enter a valid value so that the data type can be identified.​

This problem occurs when a JSON attribute in the request/response body has a "null" value. Since the data source uses the JSON entered to map the necessary attributes in order to consume the data, a null type cannot be identified by the component, as it needs a clearly defined type.

β€― Invalid example

{
"request": null
}

β€― Valid example

{
"request": 1000
}

To solve this problem, simply define the correct type for the specified attribute. If you do not know the type of the attribute to be applied, check it 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 type desired by the integrated service.

The "Parameter ID #" object must have at least one child.​

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 any associated children. As a result, the component is unable to interpret the attribute.

β€― Invalid example

{
"β€œrequest": [
"r1" : {}
]
}"

β€― Valid example

{
"request":[
"r1":{
"id":90,
"name":"test"
}
]

In the invalid example, the JSON will not be interpreted correctly by the component, as the "r1" attribute is an object with no associated children.

To solve that, you must correctly map the children of the attribute that has a problem. This information must be verified in the specification of the service to be integrated.

Problems when consuming the source in the consumption test​

It was not possible to assemble the request/response body for the data source​

This problem may occur due to any of the following situations:

  • Incorrect mapping of the request/response body in the data source: Check whether the attributes mapped in the request/response body are in accordance with the service to be consumed.
  • PATH-type parameters were stated, but not all were filled in: Fill in all PATH-type parameters before consuming the source.

It was not possible to call the data source service: java.net.ConnectException: Connection refused (Connection refused)​

It may mean that the host and port of the specified service (in the URL entered during the "REST service data" step) are not being found when consuming the service. Check whether the stated URL is valid for consumption.

It was not possible to call the data source service: java.net.UnknowHostException​

When trying to consume the service, the source is not finding the service host. Check whether the URL domain is a valid domain.

HTTP Code​

If any of the HTTP statuses are returned as a response when consuming the service, check the following table, according to the status returned:

  • 401 (HTTP 401 Unauthorized)
    • The service requires authentication to be consumed. Check whether the data source has authentication and is correct.
  • 403 (HTTP 403 Forbidden)
    • The specified service does not allow access to the requested resource.
  • 500 (HTTP 500 Internal Server Error)
    • An unexpected error occurred in the resource to be consumed.