0

I'm trying to use datamapper for transforming the incoming message, the problem is, when the message is different from expected it literally ends up the execution without calling the fault sequence that I've defined for the sequence. Is there a solution for this? How can I deal with mapping errors?

Thanks,

Tony

Community
  • 1
  • 1
Tony Montana
  • 36
  • 1
  • 4

1 Answers1

0

DataMapper mediator as of now does not perform a validation against the schema. When the mapping cannot be performed due to incompatible input, the execution fails. Since you have an XML payload, you can use a Validate mediator before the DataMapper to verify that the payload adheres to the expected XML schema. Refer https://docs.wso2.com/display/ESB490/Validate+Mediator for more details. By specifying the fault path in Validate mediator, you can solve your mentioned problem.

maheeka
  • 1,983
  • 1
  • 17
  • 25