Calling Workflow Services without Adding Service Reference
-
20 апреля 2012 г. 1:42
We have recently started working on workflow services using WF4. Our requirement has it that we would have to create many such workflows. And adding service reference to each service at client project is not looking good to us. Is there any way we call these services without adding service references. As I the service contract is not exposed outside I am not sure if it is possible. Any suggestions ??
Surender.NET
Все ответы
-
22 апреля 2012 г. 1:38Модератор
Yes you can always use a channel factory approach as described here: http://msdn.microsoft.com/en-us/library/ms734681.aspx.
This avoids needing to have a service reference for every workflow.
Thanks,
If this answers your question, please use the "Answer" button to say so | Ben Cline
-
25 апреля 2012 г. 10:51
Thanks Ben for the response.
In WF4 when we create a workflow as WCF service we dont create service interface (We just add the interface name in the receive activity), hence no way we can get service contract type to use via channel factory approach.
Looks like we would have to create service contracts exactly as used in workflows, to use with channelfactory at client project where we consume the workflow service. This seems to be working when I tried on one of the sample workflows, but not sure if I can take this approach as a standard.
Surender.NET

