How does WCF REST (and WCF WebApi) map a Uri to the correct service endpoint?
Within the context of WCF WebApi Preview 4: Inside a custom delegating channel, I would like to find the associated route prefix or service Type based on the incoming HttpRequestMessage.RequestUri.
So for instance,
RouteTable.Routes.MapServiceRoute<ManagersResource>("employees/managers", config);
RouteTable.Routes.MapServiceRoute<EmployeesResource>("employees", config);
Say a request comes in for http://server/employees/John
- How does WCF map this to the correct endpoint?
By the time the ResourceFactoryProvider
has been instantiated, it already knows the concrete service type. I can't seem to trace where the resolution happens between the Uri and routing table routes.
Much thanks in advance.