Calling Workflow Services without Adding Service Reference
-
2012年4月20日 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
全部回复
-
2012年4月22日 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
-
2012年4月25日 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

