wcfsoapwcf-routing

How to test the Routing in WCF Routing services?


We have a WCF routing service which (obviously) routes to several WCF services. We use SOAP messaging, and our SOAP headers contain a value for the consumer system to set it's identifier.

How do you test/prove that a particular request is routed to a particular WCF service?

The scenario is: the router is deployed with a particular routing configuration. The router is then updated to include new routes to more services, how do we prove the new requests are being routed correctly and existing routes remain unchanged (i.e. still routing correctly)

One solution we have thought of is to have the response populate the SOAP header with the identifier of the provider service and perform an assertion based on consumer system + request should match the provider system.

Is using SOAP headers the best way?


Solution

  • I raised a related question on how to read the Router configuration programmatically.

    Currently there is no answer there, but if we do find one, that answer will be part of the answer to this question.

    How to programmatically read the current Filter Table on a WCF Router


    We went with the solution I proposed in the question as we decided this was the best way.