REST Connector Query Preview results in “unexpected character encountered while parsing value: <”
book
Article ID: KB0077612
calendar_today
Updated On:
Products
Versions
TIBCO Cloud Integration - Connect ( Scribe )
-
Description
The web service for this scenario can return a response in either JSON or XML. The TIBCO Scribe® Online Connector for REST Web Services requires the response in JSON format.
When the web service is run and tested in Postman, a header is configured:
Key = Accept Value = application/json
In TIBCO Scribe® Online, the REST Connection tests successfully, but a Query block preview in a map results in the following error:
ERROR: Exception Type: JsonReaderException Message: Unexpected character encountered while parsing value: <. Path ", line0, position 0.
A Fiddler trace indicates the web service response is XML format, not JSON format.
Resolution
To resolve this error, configure a Custom Header in the REST Connector connection:
The error “Exception Type: JsonReaderException, Message: Unexpected character encountered while parsing value: <. Path ", line0, position 0.” can be resolved by configuring a Custom Header on the REST connection to specify application/json.