Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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. In many cases, however, those features have Annotations themselves which can be used and provide greater control over configuration.

org.apache.cxf.interceptor.InInterceptors,
org.apache.cxf.interceptor.OutInterceptors,
org.apache.cxf.interceptor.OutFaultInterceptors,
org.apache.cxf.interceptor.InFaultInterceptors

...

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:

Code Block
java
java
@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);

}

...

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.

org.apache.cxf.annotations.DataBinding

Sets the DataBinding class that is associated with the service. By default, CXF assumes you are using the JAXB data binding. However, CXF supports different databindings such as XMLBeans, Aegis, SDO, and possibly more. This annotation can be used in place of configuration to select the databinding class.

Code Block
java
java

@DataBinding(org.apache.cxf.sdo.SDODataBinding.class)
public interface MyService {
    public commonj.sdo.DataObject echoStruct(
        commonj.sdo.DataObject struct
    );
}