Skip to main content
I am referenceing a web service in a server event. In a regular VS project I can dynamically change the web reference to the WSDL depending on my environment. I cannot see how to do this using the string table to refernce the url to the WSDL. Am I missing something?

Hi,


you should be able to just set the url property of the proxy class, here is a code snippet:


using

SourceCode.Workflow.Common.Authentication;
.
.
.
.
ADCredentials k2creds = new ADCredentials();
xWS.K2HRService ws = new xWS.K2HRService();
ws.Url = K2.StringTable["webServiceURL"];
ws.Credentials = k2creds.GetCredentials(ws.Url);


 


You can also go for the no design time proxy option by making use of the ChannelFactory<> of .net, that is if you have a WCF Service off course, then you can change the deployment settings all in its config, without having to wory to change it in code.


Reply