0

I have to build a bridge to a legacy system. The chosen frontend is WCF. The methods of the legacy system may vary and are numerous, so I am thinking of something like this:

  1. Get the legacy method metadata (it is possible)
  2. In public static void Configure(ServiceConfiguration config) of a WCF service create an operation for each method.
  3. Be happy.

Now I am far from point 3 since I do not seem able to create a operation and fill it with appropriate behaviors. Up to now, in particular, I can not create OperationInvokerBehavior, for example (it is not a public class).

I am not going to enter into details here. My question is if my approach is reasonable and have somebody done this before outside the WCF developers.

HingeSight
  • 400
  • 5
  • 13
  • It seems reasonable to me, but why must you do it in runtime? can't you run some code generation tools to create your service interface and implementation before you start the service? it'll be easier to manage later on... – Roman Oct 17 '14 at 18:32
  • Now that I found an answer and drafted a working solution, I tend to think that generating code on the fly with CodeDom would have been much easier as it is much more intuitive. I am only uneasy with the loading of the generated assembly in IIS. – HingeSight Oct 22 '14 at 13:10

1 Answers1

0

Adding operations to a endpoint on runtime is possible, doable, tedious, error prone and painful journey in the WCF publis internals. Still, I found Carlos Figueira blog series on WCF Extensibility to be of great help.

HingeSight
  • 400
  • 5
  • 13