Web Services Connector – Test Connection fails with "Error reading JToken from JsonReader" (HTTP 500) but same endpoint returns 200 OK in Postman/Bruno

Hi SailPoint Community,

I am onboarding a REST API application into SailPoint IdentityIQ 8.4p2 using the Web Services connector. I am hitting a persistent issue where Test Connection always fails with HTTP 500 and the following error, even though the exact same endpoint works perfectly fine in Postman and Bruno with the same headers and API key.

connector.sdk.webservices.exception.WebServicesSdkException:{“Error”:{“Message”:“Error reading JToken from JsonReader. Path ‘’, line 0, position 0.”}}HTTP Error Code: 500

at connector.sdk.webservices.ExecutionMediator.processEndpoint(ExecutionMediator.java:659)at connector.sdk.webservices.ExecutionMediator.process(ExecutionMediator.java:356)at sailpoint.connector.webservices.v2.WebServiceFacadeV2.testConnection(WebServiceFacadeV2.java:554)at sailpoint.connector.webservices.WebServicesConnector.testConfiguration(WebServicesConnector.java:91)


Postman/Bruno result for same call

GET
Headers: X-ApiKey: , Accept: application/json

Response: 200 OK
{
“SystemRoleCollection”: {
“SystemRoleItem”:
}
}

Test Connection operation config

  • Method: GET

  • Headers:

    • X-ApiKey = <UAT key>

    • Accept = application/json

  • Root Path: $.SystemRoleCollection.SystemRoleItem

  • Successful Response Code: 2**

did you try curl command from the server?? can you try curl and see what are you getting??

What type of authentication you are using ?

@abhi617 Is it possible for you to share the application xml? Also, please try to print the requestEndPoint in your Before Rule to see if headers and body is accurate.

Note: Found a fix?Help the community by marking the comment as solution. Feel free to react with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.

Hi @abhi617

Try the following things:

  1. Try hitting the URL using the curl command
  2. Enable the connector debug log and check the error
  3. In the web service application xml, check the test connection operation that you have created.
  4. Also, share us the app xml so that we can check and help you on this issue.

im getting like this with curl command

No/Custom Authentication

I think the issue seems to be at network level, it is getting blocked when you do it from sailpoint, but it lets you through when you are using postman. There can be issue at the proxy level. Can you please try below command??

curl -v --noproxy "*" -H "X-ApiKey: <key>" -H "Accept: application/json" https://endpoint-url
  • If --noproxy “*” makes it work → the proxy is the problem.
  • If it still fails → the target API side is blocking the IIQ server’s IP.

@abhi617 Have you tried printing the requestEndpoint? This should tell your if the headers, body, url, etc is exactly the same as you set in the UI.

Hi @abhi617 ,
Can you show how you have configured custom authentication by masking the credentials, just want to see how you have mapped the response in custom authentication, and how you are reading in test connection.