Routing in WAS

For those of you who have your services hosted in WAS/IIS, the trickiest part of getting the Routing Service working is remembering that you need to reference the fully qualified assembly name (since System.ServiceModel.Routing.dll is in the GAC instead of in your service directory).  A good writeup on solving a common routing scenario with WAS hosted services is located over here.  Note that in this example we see the following capabilities used:

  • Routing on message body data (routeOnHeadersOnly=false)
  • WAS Hosted Routing Service
  • use of the Namespace table to introduce custom namespaces used in the messages

 Nicely done :)

 For reference: the fully qualified name of the Routing Service is:

"System.ServiceModel.Routing.RoutingService, System.ServiceModel.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 

This would be the path you referenced either in the Service tag of your SVC file, and in some situations also when referencing the service name inside your Web.config files.

 -Matt