...
The policies feature element is defined in namespace http://cxf.apache.org/policy. It supports two attributes:
Name | Value |
---|---|
ignoreUnknownAssertions | Indicates an exception should be thrown when encountering assertions for which no AssertionBuilders are registered (default: true). When set to false, a warning will be logged instead. |
namespace | The namespace of the WS-Policy Framework specification (default: http://www.w3.org/ns/ws-policy ). |
The element also support the the following child elements:
...
The policy engine is the central instance of the WS-Policy framework implementation. You can enable and configure it directly, using the <engine> element in the http://cxf.apache.org/policy namespace. This element supports the same attributes and child elements as the <policies> element above, except:
...
Code Block | ||||
---|---|---|---|---|
| ||||
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:cxf="http://cxf.apache.org/core"
xmlns:p="http://cxf.apache.org/policy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<p:engine enabled="true" ignoreUnknownAssertions="true"/>
</beans>
|
Note: Starting with CXF 2.2, the Policy Engine defaults to enabled=true and ignoreUnknownAssertions=true. Thus, the above configuration is no-longer needed as that is the default.
...
Name | Value |
---|---|
location | Location of the external attachment document. This takes the form of a Spring Resource type property, e.g. 'classpath:etc/policies.xml' or 'file:/x1/resources/ polciespolicies.xml'. |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
<p:externalAttachment location="classpath:org/apache/cxf/systest/ws/policy/addr-external.xml"/> |
...