private ProcessingReport validate ( Message message , SimpleJsonSchema simpleJsonSchema ) { try { JsonNode receivedJson = objectMapper . readTree ( message . getPayload ( String . class ) ) ; return simpleJsonSchema . getSchema ( ) . validate ( receivedJson ) ; } catch ( IOException | ProcessingException e ) { throw new CitrusRuntimeException ( "Failed to validate Json schema" , e ) ; } }
Validates a given message against a given json schema