Hi All,
I am trying to do something for WCF that is already being done for Web service as given on
"How to treat a Web Service-based Reference Event when moving a process definition from one environment to another"
I have added a WCF service reference http://machine1.testdom.local:17041/K2_WCF/Service.svc in a k2 workflow through process reference.
I have added a reference event in the workflow to call the WCF service.The constructor that I have added requires endpoint configuration name and remote address. I have provided the following values.
endpoint configuration name - BasicHttpBinding_IService
remote address - http://machine2.testdom.local:17041/K2_WCF/Service.svc
Notice the only difference is in the machine name. What I intend to do is consume the WCF on machine2 instead of machine2. I am doing this so that I would put this in an environment field which can be picked at the run time so that I dont have to worry about URL while moving from one machine to another (one environment to other).
This compiles and deploys correctly but when I start the workflow process it stops with an error which is shown in the error profile as following:
Could not find endpoint element with name 'BasicHttpBinding_IService' and contract 'K2WorkflowProject1.IService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element
However I am able to refer both the services correctly in a console appiication using the following code:
client = new ServiceClient("BasicHttpBinding_IService" ,"http://machine2.testdom.local:17041/K2_WCF/Service.svc");
Any help would be great.
Regards,
Sharad
P.S. I am using K2 blackpearl on windows server 2008R2