3
votes

I have a receive port with a WCF-CustomIsolated receive location.

On receive port I checked "Enable routing for failed messages".

In pipeline settings I have set ValidateDocument to true.

When a client sends me an incorrect schema, it receives a validation error (that happened in pipeline) and it's OK.

But it's not routed as a fault message to message box.

Could you help me why does it happen?

Why "routing for failed messages" does not work in this case? And in what cases it should work?

Thank you!

2

2 Answers

2
votes

On the Receive Location, go the Transport Properties, Messages, Error Handling, and check Suspend request message on failure.
Even though it says "Suspend" checking this in combination with the Routing for Failed Message on the Receive Port will actually create a FailedMessage that you are after. (If Routing for Failed Message isn't enabled it will suspend).

This applies to all the WCF adapters, not just the CustomIsolated one.

0
votes

You need to subscribe to the error message. You could use a send port or orchestration with a filter set to the receive port, message type and/or message error.