Search in sources :

Example 1 with SchemaValidationFeature

use of org.apache.cxf.feature.validation.SchemaValidationFeature in project cxf by apache.

the class JavaFirstSchemaValidationTest method createNoSchemaValidationFeature.

private static SchemaValidationFeature createNoSchemaValidationFeature() {
    Map<String, SchemaValidationType> operationMap = new HashMap<>();
    operationMap.put("*", SchemaValidationType.NONE);
    DefaultSchemaValidationTypeProvider provider = new DefaultSchemaValidationTypeProvider(operationMap);
    return new SchemaValidationFeature(provider);
}
Also used : HashMap(java.util.HashMap) SchemaValidationType(org.apache.cxf.annotations.SchemaValidation.SchemaValidationType) SchemaValidationFeature(org.apache.cxf.feature.validation.SchemaValidationFeature) DefaultSchemaValidationTypeProvider(org.apache.cxf.feature.validation.DefaultSchemaValidationTypeProvider)

Example 2 with SchemaValidationFeature

use of org.apache.cxf.feature.validation.SchemaValidationFeature in project cxf by apache.

the class JavaFirstSchemaValidationTest method createSchemaValidationFeature.

private static SchemaValidationFeature createSchemaValidationFeature() {
    Map<String, SchemaValidationType> operationMap = new HashMap<>();
    operationMap.put("saveInheritEndpoint", SchemaValidationType.BOTH);
    operationMap.put("saveNoValidation", SchemaValidationType.NONE);
    operationMap.put("saveValidateIn", SchemaValidationType.IN);
    operationMap.put("saveValidateOut", SchemaValidationType.OUT);
    DefaultSchemaValidationTypeProvider provider = new DefaultSchemaValidationTypeProvider(operationMap);
    return new SchemaValidationFeature(provider);
}
Also used : HashMap(java.util.HashMap) SchemaValidationType(org.apache.cxf.annotations.SchemaValidation.SchemaValidationType) SchemaValidationFeature(org.apache.cxf.feature.validation.SchemaValidationFeature) DefaultSchemaValidationTypeProvider(org.apache.cxf.feature.validation.DefaultSchemaValidationTypeProvider)

Aggregations

HashMap (java.util.HashMap)2 SchemaValidationType (org.apache.cxf.annotations.SchemaValidation.SchemaValidationType)2 DefaultSchemaValidationTypeProvider (org.apache.cxf.feature.validation.DefaultSchemaValidationTypeProvider)2 SchemaValidationFeature (org.apache.cxf.feature.validation.SchemaValidationFeature)2