Annotation Type SchemaValidation


@Retention(RUNTIME) @Target({TYPE,METHOD,FIELD}) @Documented @WebServiceFeatureAnnotation(id="http://jax-ws.dev.java.net/features/schema-validation", bean=SchemaValidationFeature.class) public @interface SchemaValidation
Validates all request and response messages payload(SOAP:Body) for a WebService against the XML schema. To use this feature, annotate the endpoint class with this annotation.
 for e.g.:

 @WebService
 @SchemaValidation
 public class HelloImpl {
   ...
 }
 
At present, schema validation works for doc/lit web services only.
Since:
JAX-WS 2.1.3
Author:
Jitendra Kotamraju
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Configure the validation behaviour w.r.t error handling.
    boolean
    Turns validation on/off for inbound messages
    boolean
    Turns validation on/off for outbound messages
  • Element Details

    • handler

      Class<? extends ValidationErrorHandler> handler
      Configure the validation behaviour w.r.t error handling. The default handler just rejects any invalid schema intances. If the application want to change this default behaviour(say just log the errors), it can do so by providing a custom implementation of ValidationErrorHandler.
      Default:
      com.sun.xml.ws.server.DraconianValidationErrorHandler.class
    • inbound

      boolean inbound
      Turns validation on/off for inbound messages
      Since:
      JAX-WS RI 2.2.2
      Default:
      true
    • outbound

      boolean outbound
      Turns validation on/off for outbound messages
      Since:
      JAX-WS RI 2.2.2
      Default:
      true