...
The policies feature element is defined in namespace http://cxf.apache.org/policy. It supports two attributesone attribute:
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
...
The element also support the the following child elements:
...
For example, to apply this feature to the bus and prevent exceptions being thrown when encountering unknown assertions:
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">
<cxf:bus>
<cxf:features>
<p:policies ignoreUnknownAssertions="true"/>
</cxf:features>
</cxf:bus>
</beans>
|
...
The following configuration achieves the same as in the example above:
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>
|
...
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/policies.xml'. |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
<p:externalAttachment location="classpath:org/apache/cxf/systest/ws/policy/addr-external.xml"/>
|
...