Versions Compared

Key

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

...

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.   These annotations can be applied globally to the SEI, but also can be applied at method level in both the SEI and Implementation.

 

INApply schema validation to INcoming messages on client and server
REQUESTApply schema validation to Request messages.  This annotation will cause validation to be applied to OUTgoing Client messages, and INcoming Server messages.
OUT(Since 2.7.14, 3.0.3, 3.1) Apply schema validation to OUTgoing messages on Client and Server
RESPONSE(Since 2.7.14, 3.0.3, 3.1) Apply schema validation to Response messages.  This annotation will cause validation to be applied to INcoming Client messages, and OUTgoing Server messages.
BOTHAll Apply schema validation to both INcoming and OUTgoing messages on Client and Server
NONEAll schema validation is disabled

...

.  This is the default if no annotations are provided.
Code Block
languagejava
@WebService

@SchemaValidation(type = SchemaValidationType.BOTH)
public interface MyService {
    Foo validateBoth(Bar data);

    @SchemaValidation(type = SchemaValidationType.NONE)
    Foo validateNone(@WebParam(Bar data);

    @SchemaValidation(type = SchemaValidationType.IN)
    Foo validateIn(Bar data);

    @SchemaValidation(type = SchemaValidationType.OUT)
    Foo validateOut(Bar data);

    @SchemaValidation(type = SchemaValidationType.REQUEST)
    Foo validateRequest(Bar data);
    @SchemaValidation(type = SchemaValidationType.RESPONSE)
    Foo validateResponse(Bar data);
}

 

 

Anchor
DataBinding
DataBinding

...