CXF provides several custom annotations that can be used to configure and customize the CXF runtime.
org.apache.cxf.feature.Features
The @Features annotation is used to add Features. See the FeaturesList for the list of Features we provide "out of the box", but you can easily create your own.
org.apache.cxf.interceptor.InInterceptors,
org.apache.cxf.interceptor.OutInterceptors,
org.apache.cxf.interceptor.OutFaultInterceptors,
org.apache.cxf.interceptor.InFaultInterceptors
Add interceptors to the various chains used to process messages. See Interceptors for more detail.
org.apache.cxf.annotations.WSDLDocumentation
org.apache.cxf.annotations.WSDLDocumentationCollection
For "java first" scenarios where the WSDL is derived from the Java interfaces/code, these annotations allow adding wsd:documentation elements to various locations in the generated wsdl.
For example:
@WebService @WSDLDocumentationCollection( { @WSDLDocumentation("My portType documentation"), @WSDLDocumentation(value = "My top level documentation", placement = WSDLDocumentation.Placement.TOP), @WSDLDocumentation(value = "My binding doc", placement = WSDLDocumentation.Placement.BINDING) } ) public interface MyService { @WSDLDocumentation("The docs for echoString") String echoString(String s); }
org.apache.cxf.annotations.SchemaValidation
Turns on SchemaValidation for messages. By default, for performance reasons, CXF does not validate message against the schema. By turning on validation, problems with messages not matching the schema are easier to determine.