Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/02/2024 08:23 AM
Hello,
We are having issues with handling XML responses from the targeted application using a REST connector. I have verified that the XML response can be converted to valid JSON using Code Beautify.
The main issue seems to be getting the correct tokenResponsePath. Currently, Saviynt returns this below no matter what I put for the path: responseTextMap of testConnectionRest: [string:[xmlns:http://www.domain.com/, content:######-#####-#####-####-######]].
Here is our current connectionJSON:
{
"authentications": {
"getToken": {
"authType": "oauth2",
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded",
"Accept": "application/xml"
},
"authError": [
"ERROR - Invalid User ID Company ID or Password.",
"ERROR - Invalid Project Number."
],
"url": "https://companytest.application.com/tbws/session.asmx/Logon",
"httpMethod": "POST",
"httpContentType": "application/x-www-form-urlencoded",
"errorPath": "string",
"maxRefreshTryCount": 5,
"cleanUpTextContent": true,
"tokenResponsePath": "string.xmlns.content",
"tokenType": "Bearer",
"authHeaderName": "Authorization",
"accessToken": "#####-########-####-####-#########",
"httpParams": {
"ProjNo": "TestGAB",
"CompanyID": "company",
"UserID": "serviceAccount",
"connectingProduct": "SAVIYNT",
"Password": "PA$$WORD"
},
"retryFailureStatusCode": [],
"testConnectionParams": {
"http": {
"url": "https://companytest.application.com/tbws/session.asmx/Logon?UserID=serviceAccount&CompanyID=company&Password=PA$$WORD&ProjNo=TestGAB&connectingProduct=SAVIYNT",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"successResponse": [],
"successResponsePath": "",
"errors": [],
"errorPath": "error"
}
}
}
}
Here is the response we get when done via Insomnia or Postman:
<?xml version="1.0" encoding="utf-8"?>
<string
xmlns="http://www.application.com/">#######-####-####-####-#########
</string>
Is there something else we need to be doing to extract the token from the response?