Has anybody got any kind of experience with dynamic programming using WCF. By dynamic programming I mean runtime consumption of WSDL’s. I have found one blog entry/tool: http://blogs.msdn.com/vipulmodi/archive/2006/11/16/dynamic-programming-with-wcf.aspx
Has anybody here found good tools for this?
This is one of the weirder aspects of WCF. You can dynamically create a channelfactory, but only with a known type.
I came up with a solution that is not perfect, but does work:
Create an interface, ‘IFoo’ which contains a single method, say
Execute(). In your ESB, dynamically create aChannelFactory<IFoo>for the endpoint that you want to connect to. Set the connection properties (URI, etc.).Now, you can attach services dynamically to your ESB, provided that they always implement the ‘IFoo’ interface.