Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/22/2024 12:21 PM
Hi Team,
We have 2 entitlement types in SOAP integration, how we can handle multiple ent types in Grant Access Json.
for 1 ent type, using below format, showing error as below
JSON:
[
{
"REQUESTXML": "${newEntitlementMap.get('Roles')?.size() > 0 ? '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><request API_version=\"1.0\" client=\"ULSB2\" client_ver=\"1.1\" namespace=\"default\" key=\"i6SlzfCtaiWgXIRt9xu3\"><Auth><Login><company>ULSB2</company><user>${USERNAME}</user><password>${PASSWORD}</password></Login></Auth><Modify type=\"User\"><User><id>${account.accountID}</id>' + allEntitlementMap.get('Roles').each{'<role_id>'${task.entitlement_valueKey.entitlement_value}'</role_id>'}.join('') + '</User></Modify></request>': ''}",
"REQUESTPARAMS": {
"Content-Type": "text/xml;charset=UTF-8",
"soapAction": "https://app.sandbox.openair.com/OAirService#modify",
"Host": "ulsb2.app.sandbox.openair.com"
},
"RESPONSEMAPPING": {
"TASK.PROVISIONINGCOMMENTS": "Modify.@status",
"RESPONSECODE": "Modify.@status"
},
"SOAPACTION": "https://app.sandbox.openair.com/OAirService#modify",
"SUCCESSCRITERIA": "RESPONSECODE=0"
}
]
error:
2024-10-22T16:06:51+05:30-ecm-worker-services.HttpClientUtilityService-quartzScheduler_Worker-14-985jr-DEBUG-got response for api...
2024-10-22T16:06:51+05:30-ecm-worker-rest.RestUtilService-quartzScheduler_Worker-14-985jr-DEBUG-callXMLEndpoint - responseStatusCode ::200
2024-10-22T16:06:51+05:30-ecm-worker-provisoning.SoapProvisioningService-quartzScheduler_Worker-14-985jr-ERROR-Exception occurred in GRANT ACCESS:
2024-10-22T16:06:51+05:30-ecm-worker--null-985jr--org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
with no condition check for ent types, it is working as expected:
Working JSON:
[
{
"REQUESTXML":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><request API_version=\"1.0\" client=\"ULSB2\" client_ver=\"1.1\" namespace=\"default\" key=\"i6SlzfCtaiWgXIRt9xu3\"><Auth><Login><company>ULSB2</company><user>${USERNAME}</user><password>${PASSWORD}</password></Login></Auth><Modify type=\"User\"><User><id>${account.accountID}</id><role_id>${task.entitlement_valueKey.entitlement_value}</role_id></User></Modify></request>",
"REQUESTPARAMS": {
"Content-Type": "text/xml;charset=UTF-8",
"soapAction":"https://app.sandbox.openair.com/OAirService#modify",
"Host":"ulsb2.app.sandbox.openair.com"
},
"RESPONSEMAPPING": {
"TASK.PROVISIONINGCOMMENTS": "Modify.@status",
"RESPONSECODE": "Modify.@status"
},
"SOAPACTION": "https://app.sandbox.openair.com/OAirService#modify",
"SUCCESSCRITERIA": "RESPONSECODE=0"
}
]
Can anyone please let me know how can we add check for Entitlement Type.
Regards,
Atrayee
10/22/2024 01:42 PM