WCF routing and various endpoints

316 views Asked by At

I have a little problem and don't know where to start.

I need to make a subscribtion service and if returns unique address on which consumer will send soaps after subscription. It works like so : you send a SOAP on address http://foo.org/Subscribe and in response you get address http://foo.org/SubscriptionManager/1, the next consumer will get http://foo.org/SubscriptionManager/2 etc.

How can i emplement that via WCF? I guesed that WCF have something like ASP.Net Routing, where i could route links like http://foo.org/SubscriptionManager/ and access 2 as a parameter, but i haven't found something like that.

I look forward to any help.

1

There are 1 answers

4
tom redfern On

The question I have is why do you want to route users to different endpoints?

The whole idea of returning a service URI for the consumer to call is not good design in my opinion.

You are forcing your consumers to do more work - they must make an extra call and interrogate the response just to find out which endpoint they have to call.

If your requirement is to spread load between two services you should offer a single load-balanced endpoint which will then send requests to the other endpoints.

Alternatively, if your requirement is to route certain users to one or other of the subscription services based on some rules then you can have a look at WCF-Routing.