0
Answer

Webservice with plugins - expose Plugin Names as enum

Hi @ all!

I'm trying to find a solution for the following problem:

within C# I have created a webservice, which offes the ability to execute methods of plugins which are registered by MEF at the server.

So the webservice knows after composition of MEF Exports, which plugins it can offer for execution. Right now, I have a method like this:

[OperationContract]
[FaultContract(typeof(PluginServiceFaultContract))]
string[] GetPluginTypes();

The corresponding execution method looks like this:

[OperationContract]
[FaultContract(typeof(WorkflowServiceFaultContract))]
bool StartPluginMethode(string PluginName );

It would be better to use an enum here, so the user cannot give a wrong parameter...

But since the enum would have to by created dynamically (System.Reflection.Emit?), I cannot expose it through my WSDL - or at least I don't know how.

Anyone faced that problem in the past and has a hint for me? Or is there an alternative approach?

Thanks in advance

Roland