Class PolicyProvider
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.wsdl.wsdl11.provider.PolicyProvider
- All Implemented Interfaces:
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:
-
Field Summary
Fields inherited from class TransformerObjectSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBindings(javax.wsdl.Definition definition) voidsetDelegate(BindingsProvider delegate) Set theBindingsProviderto delegate the creation of the bindings to.voidsetPolicy(org.springframework.core.io.Resource policy) Set the policy document to attach to every binding created by thedelegate.Methods inherited from class TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
PolicyProvider
public PolicyProvider()
-
-
Method Details
-
setDelegate
Set theBindingsProviderto 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 thedelegate. The resource is expected to contain a single, well-formed XML element, such as a WS-PolicyPolicyorPolicyReferenceelement. -
addBindings
public void addBindings(javax.wsdl.Definition definition) throws javax.wsdl.WSDLException - Specified by:
addBindingsin interfaceBindingsProvider- Throws:
javax.wsdl.WSDLException
-