Skip to main content Skip to complementary content

Implementing the Assertion Interface

You can chose to implement the Assertion interface from scratch, or decide to use one of the existing Assertion implementations in the cxf-api module, extending them as required:

PrimitiveAssertion

This class represents an assertion without any attributes or child elements (in particular without a nested Policy element).

The AnonymousResponses or NonAnonymousResponses assertions in the addressing metadata namespace http://www.w3.org/2007/01/addressing/metadata are examples of this type of assertion. The implementation of the equal and normalize methods in the class are trivial, and there should be no need to extend this class.

NestedPrimitiveAssertion

This class represents an assertion without any attributes, but with one mandatory nested Policy child element.

The Addressing assertions in the addressing metadata namespace is an example of this type of assertion. The implementation of the equal and normalize methods are generic, and there should be no need to extend this class.

JaxbAssertion

This class represents an assertion described by an xml schema type that has been mapped to a Java class.

The RM assertion as well as the assertions used in the HTTP module are extensions of this class. Although the equal and normalize methods are not abstract, you probably want to overwrite these methods.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!