WSE 2.0 Router 

How simple is it to implement WS-Addressing based router using WSE (Web Services Enhancements) 2.0?

Try this:

  1. Add the following to a vanilla web.config:
         <system.web>
            <httpHandlers>
                <add verb="*" path="*.asmx"
    type="Microsoft.Web.Services2.Messaging.SoapHttpRouter, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
            </httpHandlers>
         </system.web>
  2. Add this too:
         <microsoft.web.services2>
            <referral>
                <cache name="referralCache.config" />
            </referral>
         </microsoft.web.services2>
  3. Create a referral cache file (save as referralCache.config):
    <?xml version="1.0" ?>
    <r:referrals xmlns:r="http://schemas.xmlsoap.org/ws/2001/10/referral">
      <r:ref>
        <r:for>
          <r:exact><!-- SOURCE URI --></r:exact>
        </r:for>
        <r:if />
        <r:go>
          <r:via><!-- DESTINATION URI --></r:via>
        </r:go>
        <r:refId>uuid:fa468856-0057-4e11-962a-81c5e292f2ae</r:refId>
      </r:ref>
    </r:referrals>
  4. Allow NETWORK SERVICE account write access to referral cache file.
  5. Create an ASP .NET application out of this VRoot.

All SOAP requests sent to your source URI will be redirected to your destination URI. You should be careful to add SoapActor attribute with the appropriate actor URI to your destination service.

Your referral cache file is locked from the moment of first SOAP request, so changing it is impossible without shutting down IIS (or at least the app pool which is serving it).

It is possible and advised that when changing URIs you create another referral cache file and change web.config's microsoft.web.services2/referral/cache element.

Categories:  Web Services
Monday, 16 August 2004 20:52:58 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RD / MVP
Feeds
RSS: Atom:
Archives
Categories
Blogroll
Legal

The opinions expressed herein are my own personal opinions and do not represent my company's view in any way.

My views often change.

This blog is just a collection of bytes.

Copyright © 2003-2024
Matevž Gačnik

Send mail to the author(s) E-mail