ThomasW
ThomasW

Reputation: 485

Citrus Framework to validate byte array

I would like to receive a byte array and do some basic validation (converting to String and splitting, etc).

Do I have to define a message validator, or a validation script? What is the best approach?

Are there any samples?

Thanks!

Upvotes: 0

Views: 402

Answers (1)

Christoph Deppisch
Christoph Deppisch

Reputation: 2216

You could use the default binary message validator that automatically converts the binary data to base64 encoded string (http://www.citrusframework.org/reference/html/index.html#validation-binary) so you can do basic compare validation.

If this is not the way to go you could also implement your own special message validator that converts the payload and performs further validation steps. The easiest way to do this is to use a validation callback in Java DSL: http://www.citrusframework.org/reference/html/index.html#validation-callback

Upvotes: 2

Related Questions