Pabka
(Pabitra Malla)
September 24, 2024, 4:24am
1
Account aggregation for web service source is showing success with account scanned “0”.
Below is the postman response:
I have tried all the possible possibilities of root path, namespace prefix, and Response mapping. Also tried Web Service after operation rule. Yet there is no success at all.
Headers:
SOAPAction urn:ImportIntf-DataImport#RetrieveUsers
Content-Type text/xml
Possible Root Path
//NS1:return/NS1:Response/NS1:RetrieveUserResults/NS1:Users_Info/NS1:User_Data
OR
//NS1:RetrieveUsersResponse/return/Response/RetrieveUserResults/Users_Info/User_Data
//return/Response/RetrieveUserResults/Users_Info/User_Data
Also tried User_Data[*] in above root path
Below is Response Mapping
Any suggestions?Preformatted text
ashutosh08
(Ashutosh Singh)
September 24, 2024, 4:59am
2
Hi @Pabka ,
Is it possible for you to share the response xml rather than screenshot so that I can try it at my end. Please remove all the sensitive data from it.
Thanks
Pabka
(Pabitra Malla)
September 24, 2024, 5:16am
3
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS1="urn:ImportIntf-DataImport">
<NS1:RetrieveUsersResponse>
< return xsi:type="xsd:string" >
<Response>
<InfoMsg>Users have been successfully retrieved</InfoMsg>
<RetrieveUserResults>
<Users_Info>
<User_Data>
<UserID>[email protected] </UserID><FirstName>JON</FirstName><LastName>DOE</LastName>
</User_Data>
<User_Data>
<UserID>[email protected] </UserID><FirstName>DAENERYS</FirstName><LastName>KUMARI</LastName>
</User_Data>
</Users_Info>
</RetrieveUserResults>
</Response>
</return>
</NS1:RetrieveUsersResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
ashutosh08
(Ashutosh Singh)
September 24, 2024, 5:24am
4
Hi @Pabka ,
Can you try below xpath’s .
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data/FirstName
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data/LastName
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data/UserID
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data[2]
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data[2]/FirstName
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data[2]/LastName
/SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/Response/RetrieveUserResults/Users_Info/User_Data[2]/UserID
Thanks
gogubapu
(bapu gogu)
September 24, 2024, 8:53am
5
Hi @Pabka ,
You may try below rootPath and xPath and response mapping.
RootPath:
.//SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveUsersResponse/return/Response/RetrieveUserResults/User_Info/User_Data
Response Mapping:
User_ID: UserID
FirstName: FirstName
LastName: LastName
Xpath:
xmlns:xsd : http://www.w3.org/2001/XMLSchema
xmlns:xsi : http://www.w3.org/2001/XMLSchema-instance
xmlns:SOAP-ENV : http://schemas.xmlsoap.org/soap/envelope
Thank You.
Pabka
(Pabitra Malla)
September 24, 2024, 1:48pm
6
@gogubapu
The following is the error with your suggestion
Error
sailpoint.connector.ConnectorException: Error: Error extracting response from XML
Pabka
(Pabitra Malla)
September 24, 2024, 2:06pm
8
@ashutosh08
I get the error “sailpoint.connector.ConnectorException: Error: Error extracting response from XML”
Pabka
(Pabitra Malla)
September 24, 2024, 2:18pm
10
It looks like response is xml inside xml and needs parsing, any suggestion?
Pabka
(Pabitra Malla)
September 25, 2024, 3:21am
12
The ccg log is below after replacing escape character in rawResponseObject from after Operation rule. The rule is not able to replace all escape character:
<?xml version=\"1.0\"?>\r\n
<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http:\/\/schemas.xmlsoap.org\/soap\/envelope\/\" xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xmlns:SOAP-ENC=\"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/\">
<SOAP-ENV:Body SOAP-ENV:encodingStyle=\"http:\/\/schemas.xmlsoap.org\/soap\/encoding\/\" xmlns:NS1=\"urn:ImportIntf-IDataImport\">
<NS1:RetrieveUsersResponse>
<return xsi:type=\"xsd:string\">
<Response>
<InfoMsg>Users have been successfully retrieved<\/InfoMsg>
<RetrieveUserResults>
<Users_Info>
<User_Data>
<UserID>JONBAHADUR<\/UserID>
<FirstName>JON<\/FirstName>
<LastName>BAHADUR<\/LastName>..............
AfterOperation rule is below
log.debug("==== rawResponseObject ==== " + rawResponseObject);
String convertedResponse = rawResponseObject
.replace("<", "<")
.replace(">", ">")
.replace("\\r\\n", "")
.replace("\\/", "/")
.replace("\\\"", "\"")
.replace(""", "\"")
.replace("'", "'")
.replace("&", "&");
log.debug("=============convertedResponse=========== " + convertedResponse);
return convertedResponse;
Root path
//SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveRapportUsersResponse/return/Response/RetrieveUserResults/Users_Info/User_Data
The result is Account scanned “0”.
Any suggestion what I am missing in escape character? and rootpath?
gogubapu
(bapu gogu)
September 25, 2024, 3:50am
13
Hi @Pabka ,
Change rootPath to : .//SOAP-ENV:Envelope/SOAP-ENV:Body/NS1:RetrieveRapportUsersResponse/return/Response/RetrieveUserResults/Users_Info
in the rootpath dot is required.
Response Mapping:
User_ID: User_Data/UserID
FirstName: User_Data/FirstName
LastName: User_Data/LastName
Thank You.
Pabka
(Pabitra Malla)
September 25, 2024, 1:36pm
14
bapu gogu:
User_Data/LastName
@gogubapu
I changed it but still no account scanned.
gogubapu
(bapu gogu)
September 26, 2024, 5:08am
15
Hi @Pabka ,
You may try below code in After Operation rule:
log.info("==== rawResponseObject ==== " + rawResponseObject);
rawResponseObject = rawResponseObject
.replace("<", "<")
.replace(">", ">")
.replace("\\r\\n", "")
.replace("\\/", "/")
.replace("\\\"", "\"")
.replace(""", "\"")
.replace("'", "'")
.replace("&", "&");
return rawResponseObject;
Thank You.
Pabka
(Pabitra Malla)
September 26, 2024, 1:46pm
16
The escape characters are expected in ccg log except for & lt; and & gt; (which I parsed) for my response. Besides I passed root path and response mapping via After Operation rule.
Aggregation is working and scanning users. Thank you for your input