Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/24/2024 01:29 AM
The use case is that the payload about the user details needs to be encoded in Base64 format before making the API call. We're using a REST based connector for this and the application is a SOAP based. We tried with passing the payload already encoded in Base64 and it was able to make the API call successfully.
CreateAccountJSON:
{
"accountIdPath": "accountName",
"call":
[
{
"name": "call1",
"connection": "acctAuth",
"showResponse": true,
"url": "
<<url>>"
,
"httpMethod": "POST",
"httpParams": "<soapenv:Envelope xmlns:soapenv=\"//URL\"xmlns:fil=\"//URL\"><soapenv:Header/><soapenv:Body><fil:import><profile>UserManagement</profile><channelReference>testSaviynt</channelReference><data>${Base64.getEncoder().encodeToString(<User><SSO>${usersObj?.username}</SSO><Name>${usersObj?.firstname} ${usersObj?.lastname}</Name><Email>${usersObj?.email}</Email><Role>Role</Role></User>.getBytes())}</data><parameter><code>tokenValue</code><value>TokenValue</value></parameter></fil:import></soapenv:Body></soapenv:Envelope>",
"httpHeaders":
{
"Content-Type": "application/xml",
"Accept": "*/*"
},
"httpContentType": "application/xml",
"successResponses":
{
"soap:Envelope.soap:Body.ns2:importResponse.importStatus.status":
[
"InProgress",
"Ready"
]
},
"unsuccessResponse":
{
"soap:Envelope.soap:Body.ns2:importResponse.importStatus.status":
[
"-200"
]
}
}
]
}
Error message: soap:Body":{"soap:Fault":{"faultcode":"soap:Client","faultstring":"Unmarshalling Error: unexpected element (uri:\"\", local:\"User\"). Expected elements are (none)"}}}},"statusCode":500"