Class PolicyUtils

java.lang.Object
org.apache.wss4j.policy.stax.PolicyUtils

public final class PolicyUtils extends Object
  • Method Details

    • getElementPath

      public static List<QName> getElementPath(org.apache.wss4j.policy.model.XPath xPath)
      Parses an XPath into raw QName steps.
    • getElementPathDescriptor

      public static PolicyUtils.ElementPath getElementPathDescriptor(org.apache.wss4j.policy.model.XPath xPath) throws org.apache.wss4j.common.WSSPolicyException
      Parses a sp:XPath expression into validated element steps. Only chains of plain prefix:localName (or localName) steps are supported, either absolute (leading "/") or relative; wildcards, predicates, functions and descendant ("//") steps are rejected instead of silently producing a path that could never match a real element (CWE-347).
      Throws:
      org.apache.wss4j.common.WSSPolicyException
    • absoluteElementPath

      public static PolicyUtils.ElementPath absoluteElementPath(List<QName> path)
      Wraps an already fully-qualified, absolute element path (e.g. a well-known SOAP header path built in code) as an ElementPath that must match the observed path exactly.