1

If I have my web-service on both my test and my production SharePoint servers and I want to call the right one based on which environment I'm on, how would I do this? How would I construct the call string to dynamically call the proper web service? I know this is extremely basic, but I don't know how to do this for the life of me.

For example, the web service endpoints are:

http://testsharepoint/_bin/PDFService/Convert.svc/CostsForm http://productionsharepoint/_bin/PDFService/Convert.svc/CostsForm

How would I build the web-service call string out to make sure the proper environment's web-service is called?

  • 1
    you user the word workflow, are you using sharepoint workflow? is that is the case, the workflow has context vars, one of those is Current Site URL so you can easily change the service call. – Marco May 15 '17 at 14:16
  • Yes I am. Sorry for not specifying that! – The Vanilla Thrilla May 15 '17 at 14:19
  • There's a workflow context variable called Current Site Url, just concatenate that variable and the /_bin/PDFService/Convert.svc/CostsForm – Mike May 15 '17 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.