Web Service Variable is created as below :
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">
XPath Expression : /*/*/*/*[local-name()='Permission']/text()
If using standard XPATH 1.0/2.0 API, the above XPath Expression parses the result as :
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>
Policy Server : 12.52 SP1 and above Policy Server OS : ANY
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.
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.