class %SOAP.Policy
extends %RegisteredObject, %XML.Adaptor
Implementation class for WS-Policy in a web service configuration.
WS-Policy 1.2 and 1.5 are both supported.
This class is used internally by Caché. You should not make direct
use of it within your applications. There is no guarantee made about either
the behavior or future operation of this class.
property PolicyTree
as %CacheString(XMLPROJECTION="none") [ MultiDimensional ];
Policy information is stored in either a local or global variable based on macros in %soap.inc.
Permanant storage is in the policy global.
Below the policy storage is defined in terms of the local property 'policy'.
This storage definition is subject to change and should only be accessed via ISC internal code.
Root node of Policy definition.
PolicyTree($$$SOAPConfigPolicyVersion)=policyVersion
PolicyTree($$$SOAPConfigPolicyText)=policyText
PolicyTree($$$SOAPConfigPolicyId)=policyId
PolicyTree($$$SOAPConfigPolicyName)=policyName
PolicyTree(1)=$$$SOAPConfigPolicy
PolicyTree(1,$$$SOAPConfigPolicyChildren)=childNodeList
where
policyVersion is the WS-Policy version of this policy.
policyId is the value of the wsu:Id or id attribute of the Policy element.
policyName is the value of the Name attribute of the Policy element.
policyText is the text of the original Policy XML.
childNodeList is $lb(nodeId,....) where nodeId is the integer id of a child node of this Policy element.
The possible nodes of a Policy are:
For policy operators
PolicyTree(nodeId)=$$$SOAPConfigPolicyExactlyOne
PolicyTree(nodeId)=$$$SOAPConfigPolicyAll
PolicyTree(nodeId)=$$$SOAPConfigPolicy
PolicyTree(nodeId,$$$SOAPConfigPolicyChildren)=childNodeList
For assertions
PolicyTree(nodeId)=assertionName
PolicyTree(nodeId,$$$SOAPConfigPolicyChildren)=numParameters
PolicyTree(nodeId,$$$SOAPConfigPolicyNamespace)=assertionNamespace
PolicyTree(nodeId,$$$SOAPConfigPolicyOptional)=( 1 | "" )
PolicyTree(nodeId,$$$SOAPConfigPolicyIgnorable)=( 1 | "" )
PolicyTree(nodeId,parameterIndex,parameterName)=parameterValue
PolicyTree(nodeId,parameterIndex,parameterName,$$$SOAPConfigPolicyNamespace)=parameterNamespace
PolicyTree(nodeId,parameterIndex,parameterName,parameterAttribute)=parameterAttributeValue
PolicyTree(nodeId,parameterIndex,parameterName,parameterAttribute,$$$SOAPConfigPolicyNamespace)=parameterAttributeNamespace
PolicyTree(nodeId,$$$SOAPConfigPolicy)=policyNode
where
assertionName is the element qname of an assertion
numParameters is the number of parameters.
parameterIndex is the index of the parameter.
parameterName is element QName or @attribute QName
For assertName or parameterName, the qname in is of the form:
sp:NCNAME for qname in WS-SecurityPolicy namespace or
NCNAME for other namespaces and the namespace is given in the $$$SOAPConfigPolicyNamespace node.
parameterValue is the value of a parameter as a string.
If the parameter is an element, then the string contains the full XML coontents of the parameter.
parameterAttribute is the name of an attribute for the parameter element
parameterAttributeNamespace is the namespace of an attribute for the parameter element.
parameterAttributeValue is the value of an attribute for the parameter element.
The assertion and all its parameters are defined in the same node.
policyNode is the integer id of the child Policy node of this assertion element.
property internal
as %Boolean(XMLPROJECTION="none");
If internal is true, then running in internal output mode.
method InternalError(error As %String)
Throw exception for internal error during Analyze.
Usually related to unexpected structure in normalized policy.
classmethod WriteOneAlternative(ByRef alternative, ByRef nslist, indent As %String)
as %String
Write one analyzed alternative