...
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.
IN | Apply schema validation to INcoming messages on both Client client and Server messagesserver |
REQUEST | (Since 2.7.14, 3.0.3, 3.1) Apply 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 both Client and Server messages |
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. |
BOTH | All Apply schema validation to both INcoming and OUTgoing messages on both Client and Server messages |
NONE | All schema validation is disabled. |
Code Block | ||
---|---|---|
| ||
@WebService
@SchemaValidation(type = SchemaValidationType.BOTH)
public interface MyService {
Foo validateBoth(Bar data);
@SchemaValidation(type = SchemaValidationType.NONE)
Foo validateNone(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 | ||||
---|---|---|---|---|
|
...
Used on the JAX-WS service implementation object to mark a method as preferring the 'async' version of the method instead of the synchronous version. With JAX-WS, services default to the synchronous methods that require the returning value to be returned from the method. By marking a method with the @UseAsyncMethod annotation, if the transport supports it, CXF will call the async version that takes an AsynHandler AsyncHandler object and the service can call that handler when the response is ready. If the transport does not support the CXF continuations, the synchronous method will be called as normal.
...