Consume webservice with dynamic URL in OutSystem extension (.NET Code)


I'm facing a problem where the Outsystem extension code, using original URL instead of dynamic URL which I passed to extension method.

Details as below:
1. I created C# dll and use it as an extension in Outsystem which consume a webservice pointing to DEV environment URL.
2. I'm trying to consume the service in QA environment by passing new URL from OutSystem's SiteProperty.
3. Inside the C# code, I have url assignment as below for dynamic URL. If I tried directly in C# code, it can consume the service via new URL. But when added the C# code as an extension in Outsystem, I'm facing this issue.

var service = new LoginService.LoginProxyService();
service.Url = URL; // this is dynamic url
LoginService.WSContext conn = service.login(User, Password, SlnName, DcName, Language, DbType);

Kindly, share your idea to resolve this issue.


Hi Raj,

What is exactly the problem you are facing? You said you cannot connect to the new URL, but what is exactly the error?

The code seems pretty straigthforward. Bear in mind that running the code directly from C# you are running the code on a different machine, since the code excuted from an OutSystems extension runs in the server. I think we need more data to troubleshoot the issue.

Rank: #170

Hi Eruthia,

Check in your service center, under Monitoring > Extensions if there is any error logged about it:

Rank: #44956

Hi  Ivo Gonçalves and Raphael Ranieri

Thanks for the reply. I managed to settle this issue. Problem was the extension look for my old method without URL even after I have refresh the extension. I delete Source and Template folder in local drive, then update the code from extension and rebuild it. It can pickup the new method with URL. 

Thanks again for the input.