Web Services Authentication and Authorization

Web Services Authentication and Authorization

In need to create some web services in OutSystem, this web services can be accessed olny by some users. My idea is to use permission areas to control the access to this web services, But i don´t know how the client applications that will consume this web services can authenticate.
How can i use authentication in OutSystems web services without using integrated authentication?

It is possible to do something like the following code,to authenticate in a .Net client:
Service.TestWS serv = new Service.TestWS();
serv.Credentials = new NetworkCredential("user", "pass");

Thanks in advance

Hi Fernando,

The way to use OutSystems Authentication and permission areas without using integrated authentication is:

  1. Is to use the EnhancedWebReferences ( you can find it here) to retrieve the SOAP header comming from your .NET client and parse it to obtain the credentials.
  2. Use the Built-in Action "Login" to validate and authenticate the user.
  3. Since there are no permission areas on the WebService method, use the CheckPermission(description here) for the Permission Area(s) you want to allow.



Nuno Teles

Hi Nuno
Thanks for the answer.

But I have another problem. The wsdl generated by OutSystems web services doesn't contains "soap header" definitions.So when i try to use the proxy client generated by visual studio(from wsdl), i don´t know how change the soap headers to pass the credentials to the web service.

Thanks again
Fernando Pinto

Hi Fernando,


In fact OutSystems Web-Service does not expose the SOAP Headers in the WSDL but, if you can send them in the web-service request they can be read using the EnhancedWebReferences extension (available in the TechCenter), as Nuno wrote.


Are you able to change the web-service client to send the necessary SOAP Headers?



Best regards,


João Portela


Hi Nuno,

I tried to use the EnhancedWebReferences extension.
I don't see a "login" function to set credentials for a webservice

What I need to do is something like this:
CompanyService service = new CompanyService();
service.AuthHeaderValue = new AuthHeader() { Username = "
tester@nmbrs.nl", Password = "test123" };

But still got Authentication errors if accessing a webservice ... any example OML using this ?

Hi Joao,
Good Morning.
Hope u remember me speaking about the web service issue.
This is the issue 
I need to post my data to these url .I tried using soap ui and it works.In OS i'm using setwebreferenceurl to post this url at run time.Cn u plz look at this.
I have attached my OML for your reference.