/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }
/** * Based on the Schema Validation configuration, will initialise the * DataReader with or without the schema set. * * Can also be called to override schema validation at operation level, thus the reader.setSchema(null) * to remove schema validation */ protected void setDataReaderValidation(Service service, Message message, DataReader<?> reader) { if (shouldValidate(message)) { //all serviceInfos have the same schemas Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); reader.setSchema(schema); } else { reader.setSchema(null); // if this is being called for an operation, then override the service level } }