Hi
Scenario: I am calling a web method from a WinForms method. The proxy
of the web service then checks one of it's settings.
Depending on the setting I want the proxy to call a method in the
instance of the WinForms class that called the web method. Once
the client-side method is complete the web method needs to continue its
processing. Unfortunately, I can't send a reference of the class to
the proxy as the proxy may be called by other applications.
Has anyone done anything like this? Or does anyone have any ideas on
how to do it?
Any ideas would be greatly appreciated.
Regards
Mike
hashimisayed@gmail.com - 10 Sep 2005 15:59 GMT
Hi,
You definately don't want to put any code in the proxy class because
that class is autogenerated, as you know; you will likely endup
overriding something at some point. What you want in this case, is a
pre-processor. Just create another class and call that instead of the
proxy. Let this class decide whether to call the proxy or not. That
way, you localize the logic that determines what to call.
Thanks,
Sayed Y. Hashimi
http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg/detail/-/1590595513/qid=1126361421/sr=1-1/r
ef=sr_1_1/102-5068238-6758524?v=glance&s=books