Freigeben über


Simple WSE Routing Sample for Classic SOAP Service

 

 

A customer came to me recently asking about options to migrate a set of SOAP services hosted on Windows 2003 into two new modern datacenters running Windows 2012. The most critical requirement for the customer was that the client remain unaware of the change and client proxies could not be modified.
We decided to insert the WSE Routing layer on the SOAP server layer. WSE routing is implemented through an IHttpHandler. Done this way, the handler can intercept the request for any of the client services and make routing decisions on behalf of the client.
So what’s the rub then? Don’t we have routing samples in the WSE QuickStart? Yes, we do, however, they introduce some complexity which makes the most critical requirement, not modifying the client proxies, nearly impossible. The routing samples assume your clients were built using WSE and introduce a requirement for WS-Address to be present in the client request (which can be modified through a SoapFilter). However, we can rebuild the same project using only classic Web Service SOAP standards which really cleans up the project and demonstrates how simple it is to utilize WSE 3.0 routing for your classic SOAP service needs! Download WSE_Soap_Router!
Components of the Sample:
  • ClassicSoapClient – console application which was a web reference to DataCenter.asmx
  • WSE_Routing_Sample – Classic ASMX web project with two web services:
    • DataCenter.asmx – ClassSoapClient was built against this service
    • DataCenter1.asmx –  this is where the call will be routed instead
  • SoapRouter.cs – this is also contained in the WSE_Routing_Sample web project and contains the logic to process the incoming SOAP message and route where desired

Comments

  • Anonymous
    October 28, 2014
    Project "WSE_Routing_Sample" not include in zip!

  • Anonymous
    October 29, 2014
    @ Likol Lee - sorry for the confusion - the file name is WSE_SOAP_ROUTER.zip and the direct link is: http://1drv.ms/1u7Dnvj I have added the web site project to the zip file. This was hosted in IIS on my sample (classic .NET 2.0 AppPool).