Blog Viewer

Tech Tip : CA Single Sign-On :Policy Server:XPath evaluating only first result

By Ujwol posted 10-18-2016 08:02 PM

  

Problem

Web Service Variable is created as below :

adminuiconfig.jpg

SOAP Response :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<Permissions>
<Permission>SuperUser</Permission>
<Permission>Manager</Permission>
<Permission>HR</Permission>
<Permission>Accountant</Permission>
</Permissions>
</soapenv:Body>
</soapenv:Envelope>

 

XPath Expression : /*/*/*/*[local-name()='Permission']/text()

If using standard XPATH 1.0/2.0 API, the above XPath Expression parses the result as :

working.jpg

 

Reference : http://www.freeformatter.com/xpath-tester.html

However, for the same SOAP response and XPath combination, Policy server fetches only the first result and hence resolves this Web Service variable to value (only) "SUPERUSER"

Policy server Java Util.log

October 16, 2016 9:04:30.76 PM[17008593:AEC Variable Resolution] After resolution resolved variables: <RVARS><Var name="EmptyString" rtype="3"><![CDATA[""]]></Var><Var name="BBHWSVariable" rtype="3"><![CDATA[SUPERUSER]]></Var></RVARS>  

Environment

Policy Server : 12.52 SP1 and above Policy Server OS : ANY

Cause

This is as per the policy server design and is currently the limitation. Policy server is designed to evaluate to only the first node from the list. The other nodes are ignored.

Resolution

There is no workaround/resolution for this functionality at the moment.

Customer might implement their own web service client and XML parser using the custom Active Expression. 

Additional Information

N/A

1 comment
0 views