Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Exception in converting responseText to Map

IAM-Vaibhav
New Contributor III
New Contributor III

Hi Team ,

I am facing Exception in converting responseText to Map while importing accounts from application. below is the account import json and able to call api successfully as per debug logs. Could you please check this.

Account Import JSON:

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<hostname>/<appname>api/v1/admin/users",
"httpParams": "{}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"cleanUpTextContent": true,
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "user_name~#~char",
"name": "user_name.key~#~char"
},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
401,
403
]
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}

I have enable debug logs for this, I can see api call is successful and able to get the user data but unable to import it in the saviynt.

I am facing below error:

2023-12-05/14:13:18.550 [{}] [quartzScheduler_Worker-16] DEBUG rest.RestUtilService - pullObjectsByRest - responseStatusCode ::200
2023-12-05/14:13:18.551 [{}] [quartzScheduler_Worker-16] DEBUG rest.RestProvisioningService - Exception in converting responseText to Map
2023-12-05/14:13:18.551 [{}] [quartzScheduler_Worker-16] DEBUG rest.RestProvisioningService - Entered getResponseHeaders method
2023-12-05/14:13:18.552 [{}] [quartzScheduler_Worker-16] DEBUG rest.RestProvisioningService - responseError : null
2023-12-05/14:13:18.552 [{}] [quartzScheduler_Worker-16] DEBUG rest.RestProvisioningService - isAuthError: false

9 REPLIES 9

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @IAM-Vaibhav,

Could you please share the postman snapshot and also the complete debug logs.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

IAMVaibhav_0-1701853597835.png

 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @IAM-Vaibhav,

Seems above response is not in the valid json format, 

sudeshjaiswal_0-1701931820771.png

This has to be rectified by the application teams to make the response of the application to make the valid json. if it  not a valid json, the import wonts works, hence where you are getting the response mapping error.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal ,

I checked with application team and below is their response.

Archibus tech support came back with this response:

There would be no way to change this behavior, and I believe that changing it would be against the HTTP specification. The verbatim response of 'HTTP/1.1 200 OK' is the correct formatting for the HTTP header as specified by the IETF, and that any given request over HTTP will respond in the same way when looking at the raw response data.

Is there any way in Saviynt though which we can resolve this on Saviynt side.

 

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @IAM-Vaibhav,

Currently there is no way, if the response is not in correct json format,  you wont be able to import the account from the application.

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

IAM-Vaibhav
New Contributor III
New Contributor III

Hi @sudeshjaiswal ,

application team has change the response from "Code": 200 OK to "Code": 200. Previous error Exception in converting responseText to Map has gone now. Now I am getting : groovy.lang.MissingPropertyException: No such property: key for class: java.lang.String. I checked all the property and there names mapped in ColsToProp mapping.

Current JSON : 

{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<URL>/api/v1/admin/users",
"httpParams": "{}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"cleanUpTextContent": true,
"listField": "users",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "user_name~#~char",
"name": "user_name.key~#~char"
},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
401,
403
]
}
}
}
},
"entitlementParams": {},
"acctEntParams": {}
}

sudeshjaiswal
Saviynt Employee
Saviynt Employee

@IAM-Vaibhav  Is the postman reposne is in valid json format now?

Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Hi @sudeshjaiswal ,

 

Yes.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @IAM-Vaibhav,

Can you please try with the below json,

{
  "accountParams": {
    "connection": "userAuth",
    "processingType": "SequentialAndIterative",
    "call": {
      "call1": {
        "callOrder": 0,
        "stageNumber": 0,
        "http": {
          "url": "https://<URL>/api/v1/admin/users",
          "httpHeaders": {
            "Authorization": "${access_token}",
            "Accept": "application/json"
          },
          "httpContentType": "application/json",
          "httpMethod": "GET"
        },
        "cleanUpTextContent": true,
        "listField": "users",
        "keyField": "accountID",
        "colsToPropsMap": {
          "accountID": "user_name~#~char",
          "name": "user_name~dot#key~#~char"
        }
      }
    }
  },
  "entitlementParams": {},
  "acctEntParams": {}
}


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".