/** * A convenience method to check for schema validation config in the message context, and then in the service model. * Does not modify the Message context (other than what is done in the getContextualProperty itself) * * @param message * @param type */ public static SchemaValidationType getSchemaValidationType(Message message) { SchemaValidationType validationType = getOverrideSchemaValidationType(message); if (validationType == null) { validationType = getSchemaValidationTypeFromModel(message); } if (validationType == null) { validationType = SchemaValidationType.NONE; } return validationType; }
/** * A convenience method to check for schema validation config in the message context, and then in the service model. * Does not modify the Message context (other than what is done in the getContextualProperty itself) * * @param message * @param type */ public static SchemaValidationType getSchemaValidationType(Message message) { SchemaValidationType validationType = getOverrideSchemaValidationType(message); if (validationType == null) { validationType = getSchemaValidationTypeFromModel(message); } if (validationType == null) { validationType = SchemaValidationType.NONE; } return validationType; }
private static SchemaValidationType getSchemaValidationTypeFromModel(Message message) { Exchange exchange = message.getExchange(); if (exchange != null) { BindingOperationInfo boi = exchange.getBindingOperationInfo(); Endpoint endpoint = exchange.getEndpoint(); if (boi != null && endpoint != null) { SchemaValidationType validationType = null; OperationInfo opInfo = boi.getOperationInfo(); EndpointInfo ep = endpoint.getEndpointInfo(); if (validationType == null && opInfo != null) { validationType = getSchemaValidationTypeFromModel(message, opInfo); if (validationType == null && ep != null) { validationType = getSchemaValidationTypeFromModel(message, ep); } } return validationType; } } // else return null; }
private static SchemaValidationType getSchemaValidationTypeFromModel(Message message) { Exchange exchange = message.getExchange(); SchemaValidationType validationType = null; if (exchange != null) { BindingOperationInfo boi = exchange.getBindingOperationInfo(); if (boi != null) { OperationInfo opInfo = boi.getOperationInfo(); if (opInfo != null) { validationType = getSchemaValidationTypeFromModel(opInfo); } } if (validationType == null) { Endpoint endpoint = exchange.getEndpoint(); if (endpoint != null) { EndpointInfo ep = endpoint.getEndpointInfo(); if (ep != null) { validationType = getSchemaValidationTypeFromModel(ep); } } } } return validationType; }
private static SchemaValidationType getSchemaValidationTypeFromModel(Message message) { Exchange exchange = message.getExchange(); SchemaValidationType validationType = null; if (exchange != null) { BindingOperationInfo boi = exchange.getBindingOperationInfo(); if (boi != null) { OperationInfo opInfo = boi.getOperationInfo(); if (opInfo != null) { validationType = getSchemaValidationTypeFromModel(opInfo); } } if (validationType == null) { Endpoint endpoint = exchange.getEndpoint(); if (endpoint != null) { EndpointInfo ep = endpoint.getEndpointInfo(); if (ep != null) { validationType = getSchemaValidationTypeFromModel(ep); } } } } return validationType; }
private static SchemaValidationType getSchemaValidationTypeFromModel(Message message) { Exchange exchange = message.getExchange(); if (exchange != null) { BindingOperationInfo boi = exchange.getBindingOperationInfo(); Endpoint endpoint = exchange.getEndpoint(); if (boi != null && endpoint != null) { SchemaValidationType validationType = null; OperationInfo opInfo = boi.getOperationInfo(); EndpointInfo ep = endpoint.getEndpointInfo(); if (validationType == null && opInfo != null) { validationType = getSchemaValidationTypeFromModel(message, opInfo); if (validationType == null && ep != null) { validationType = getSchemaValidationTypeFromModel(message, ep); } } return validationType; } } // else return null; }
/** * A convenience method to check for schema validation config in the message context, and then in the service model. * Does not modify the Message context (other than what is done in the getContextualProperty itself) * * @param message */ public static SchemaValidationType getSchemaValidationType(Message message) { SchemaValidationType validationType = getOverrideSchemaValidationType(message); if (validationType == null) { validationType = getSchemaValidationTypeFromModel(message); } if (validationType == null) { Object obj = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED); if (obj != null) { validationType = getSchemaValidationType(obj); } } if (validationType == null) { validationType = SchemaValidationType.NONE; } return validationType; }
/** * A convenience method to check for schema validation config in the message context, and then in the service model. * Does not modify the Message context (other than what is done in the getContextualProperty itself) * * @param message */ public static SchemaValidationType getSchemaValidationType(Message message) { SchemaValidationType validationType = getOverrideSchemaValidationType(message); if (validationType == null) { validationType = getSchemaValidationTypeFromModel(message); } if (validationType == null) { Object obj = message.getContextualProperty(Message.SCHEMA_VALIDATION_ENABLED); if (obj != null) { validationType = getSchemaValidationType(obj); } } if (validationType == null) { validationType = SchemaValidationType.NONE; } return validationType; }