Suppose I have the following (rather common) model
Client invokes web service request -> request added to server queue -> server invokes 3rd party app via web service -> 3rd party app notifies server that event processing is finished -> server notifies client that request is completed
What I am wondering about is the 'server invokes 3rd party app via web service' stage. The 3rd party app exposes web service methods that are configured inside the application. For instance, I might create a method in this app called 'MultiplyByTwo'. Then I click 'GO' and it generates a web service with methods like BeginCalculateMultiplyByTwo and EndMultiplyByTwo (using the IAsync model). This is great.
Now I am creating a queue object so that multiple clients can request this service and have the server queue them up for sequential execution. So this queue object will have a method like runNext() that will invoke the web service on the 3rd party app. This is great so long as I know the name of the methods that are being called (BegingCaculateMultiplyByTwo in this case), but what if I want to dynamically change the name of the method?
So in the 3rd party app, I change my web service method and call it 'MultiplyByThree'. This will expose BeginMultiplyByThree and some other methods with a predictable naming scheme. How can I set my class up to dynamically call a method of which I dont yet know the name?
Ideally if I could set the name of the method to be called in an app.config file that would be great.
I suppose this is something I can achieve via reflection?