Class PolicyProvider

java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.wsdl.wsdl11.provider.PolicyProvider
All Implemented Interfaces:
BindingsProvider

public class PolicyProvider extends TransformerObjectSupport implements BindingsProvider
Implementation of the BindingsProvider interface that attaches a policy document, such as a WS-Policy Policy or PolicyReference element, to every Binding in the WSDL.

This provider delegates the actual creation of the bindings to another BindingsProvider, and adds the given policy to each of the bindings that provider creates. The policy is added as-is, without any validation of its content; it is up to the user to supply a well-formed policy document, such as a WS-Policy or WS-SecurityPolicy fragment.

Since:
5.1.0
See Also:
  • Constructor Details

    • PolicyProvider

      public PolicyProvider()
  • Method Details

    • setDelegate

      public void setDelegate(BindingsProvider delegate)
      Set the BindingsProvider to delegate the creation of the bindings to.
      Parameters:
      delegate - the delegate to call
    • setPolicy

      public void setPolicy(org.springframework.core.io.Resource policy)
      Set the policy document to attach to every binding created by the delegate. The resource is expected to contain a single, well-formed XML element, such as a WS-Policy Policy or PolicyReference element.
    • addBindings

      public void addBindings(javax.wsdl.Definition definition) throws javax.wsdl.WSDLException
      Specified by:
      addBindings in interface BindingsProvider
      Throws:
      javax.wsdl.WSDLException