# WebService - XML Response Mapping

**URL:** <https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533>\
**Category:** SHF Discussion and Questions\
**Tags:** sailpoint-identity-security\
**Created:** [April 28, 2025, 11:18am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533 "2025-04-28T11:18:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![srpodeti](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@srpodeti](https://developer.sailpoint.com/discuss/u/srpodeti)\
**Post date:** [April 28, 2025, 11:18am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/1 "2025-04-28T11:18:57Z")

</div>

Hello Team/Experts,  
I am looking for help to parse the XML response in Webservices connector.  
response::

[soap\_response.txt](https://developer.sailpoint.com/discuss/uploads/short-url/nkgpTXLZqpOUa3f9jIoqbZlNr12.txt) (7.7 KB)

Below are the configuration in WS connector.  
Headers  
Accept: \* / _, Content-Type: application/json  
Response Information  
Root Path: .//MasterDataResponse/MasterDataResult/UserRoles/UserRole  
Success Code: 2_\*  
Response Mapping  
Schema attributes (on the left column)  
GRPNAME  
Attribute Path (On the right column)  
@GRPNAME

XPath Name Space Mapping:

 ![g1](https://global.discourse-cdn.com/sailpoint/original/3X/3/5/354d2e21d8c801e6e02c87077a7bf9f7ed4bc911.png)

After Entilement Aggregation i am getting Entitlements Scanned 0.

How should I configure the response to map the attributes like GRPNAME?

Could you please help me?

---

<div class="post-metadata">

**Author:** ![sidharth\_tarlapally](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sidharth_tarlapally/32/26178_2.png) [@sidharth\_tarlapally](https://developer.sailpoint.com/discuss/u/sidharth_tarlapally)\
**Post date:** [April 28, 2025, 11:54am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/2 "2025-04-28T11:54:56Z")

</div>

Helo @srpodeti

Check if these are helpful :

> [@WebServices | Account Aggregation | Mapping of XML Response](https://developer.sailpoint.com/discuss/t/webservices-account-aggregation-mapping-of-xml-response/16742):
>
> Hello, I need help in understanding how to Map an XML Response from a WS Account Aggregation. For example if the response body looked like this, (using Tableau API Response for example only) \<?xml version='1.0' encoding='utf-8'?\> \<tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api https://help.tableau.com/samples/en-us/rest\_api/ts-api\_3\_4.xsd"\> \<pagination pageNumber="1" pageSize="100" totalAvailable="28"…

> [@WebService - XML Response Mapping](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/67067):
>
> Hello Experts, Trying to retrieve the roleKey and text value from the below XML response but unable to get the values. Below are my configurations: Root Path : //UserRoles/UserRole[\*] Response Mapping and XPath Namespace Mapping: Attached Actual Response : Attached Kindly help me find the missing configurations

> [@XPath in Entitlement Aggregation](https://developer.sailpoint.com/discuss/t/xpath-in-entitlement-aggregation/80391/8):
>
> Thanks for the responses, everyone, but I gave up on doing it the conventional way and created this after rule instead haha import java.util.\*; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import org.xml.sax.InputSource; import java.io.StringReader; import org.w3c.dom.NodeList; if (!rawResponseObject.equals("")) { …

Thanks  
Sid

---

<div class="post-metadata">

**Author:** ![jsosa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jsosa/32/31578_2.png) [@jsosa](https://developer.sailpoint.com/discuss/u/jsosa)\
**Post date:** [April 28, 2025, 8:17pm UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/3 "2025-04-28T20:17:51Z")

</div>

Hi! Pleae try:

Root path:  
//MasterDataResponse/MasterDataResult/UserRoles

schema attributes: GRPNAME  
attribute path: UserRole/GRPNAME (or maybe /UserRole/GRPNAME)

---

<div class="post-metadata">

**Author:** ![srpodeti](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@srpodeti](https://developer.sailpoint.com/discuss/u/srpodeti)\
**Post date:** [April 29, 2025, 4:47am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/4 "2025-04-29T04:47:41Z")

</div>

Hi @jsosa , Thanks for the reply, The issue is same unable to aggregate the entitlement’s.

---

<div class="post-metadata">

**Author:** ![Rohit\_Sahu](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@Rohit\_Sahu](https://developer.sailpoint.com/discuss/u/Rohit_Sahu)\
**Post date:** [April 29, 2025, 6:08am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/5 "2025-04-29T06:08:37Z")

</div>

Hi @srpodeti ,

Your Root Path and Response Mapping configuration looks good. Once try with the following changes:

Change your header like this: Content-Type: application/xml

And, XPath Name Space Mapping:

xmlns:xsd: [http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)  
xmlns:soap : [http://schemas.xmlsoap.org/soap/envelope/](http://schemas.xmlsoap.org/soap/envelope/)  
xmlns: xsi:[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)  
xmlns: [http://tempuri.org/](http://tempuri.org/)

Hope this will work!  
Rohit

---

<div class="post-metadata">

**Author:** ![srpodeti](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@srpodeti](https://developer.sailpoint.com/discuss/u/srpodeti)\
**Post date:** [April 29, 2025, 7:17am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/6 "2025-04-29T07:17:05Z")

</div>

Hi @Rohit_Sahu ,

I tried the above suggestions still same issue. Zero entitlements are scanned.

---

<div class="post-metadata">

**Author:** ![j\_place](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/j_place/32/19181_2.png) [@j\_place](https://developer.sailpoint.com/discuss/u/j_place)\
**Post date:** [April 29, 2025, 8:24am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/7 "2025-04-29T08:24:38Z")

</div>

Hi @srpodeti - Your Web Service is wrapping the xml you are interested in as a string CDATA blob; my understanding is that that can’t be directly parsed via XPath. If you can’t get the WS to send raw XML, then you are into a more complex solution including perhaps an After Operation Rule to extract the XML body.

---

<div class="post-metadata">

**Author:** ![srpodeti](https://avatars.discourse-cdn.com/v4/letter/s/977dab/32.png) [@srpodeti](https://developer.sailpoint.com/discuss/u/srpodeti)\
**Post date:** [April 29, 2025, 9:06am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/8 "2025-04-29T09:06:05Z")

</div>

Hi @j_place ,

I wrote the after operation rule and i am getting below error.

Exception during aggregation of Object Type Role on Application Example POC [source]. Reason: java.lang.RuntimeException: An error occurred while aggregating Application Example POC [source] sailpoint.connector.ConnectorException: Error: The application script threw an exception: org.xml.sax.SAXParseException; lineNumber: 75; columnNumber: 17; The element type “p” must be terminated by the matching end-tag "

". BSF info: Example After Operation Rule at line: 0 column: columnNo  
[comu.txt](https://developer.sailpoint.com/discuss/uploads/short-url/uEppldSZRKZMzrESGLr0RJHPKAg.txt) (1.9 KB)

Could you please help me where this error is coming?

---

<div class="post-metadata">

**Author:** ![j\_place](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/j_place/32/19181_2.png) [@j\_place](https://developer.sailpoint.com/discuss/u/j_place)\
**Post date:** [April 29, 2025, 9:26am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/9 "2025-04-29T09:26:21Z")

</div>

Hi @srpodeti - I’m afraid I don’t have the bandwidth to debug your rule, but please check that you are extracting the CDATA first and then doing the XPath on the result, which looks like it has a root of /schema1/complexType/UserRoles

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [June 28, 2025, 9:26am UTC](https://developer.sailpoint.com/discuss/t/webservice-xml-response-mapping/116533/10 "2025-06-28T09:26:51Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
