160
Views
8
Comments
Solved
Re : Need autentication to access a web reference
Question
Hi,

I´m trying to add a web reference to my project but it gives me an error: "Access Denied(error:401)".

I try to reaching the web server using the browser and i need to do the autentication on the server machine.

It is possible to add a web reference that needs autentication? If yes, how can i do that?
Thanks,
Gonçalo Marques
UserImage.jpg
Debasis Sahoo
Solution

Hi Stanley,

Thanks for the clarification. I was wondering if any new methodology came into picture with V10.

Anyways, so far as my work is getting done in an efficient way, i don't have any issues :)

2011-08-23 22-04-05
Tiago Simões
Staff
Hi Gonçalo,

You can check out the EnhancedWebReferences Extension that will allow you to authenticate before calling a web reference.

Cheers,
Tiago Simões
2026-03-26 14-15-22
Afonso Metello
Champion
While the extention recomended by Tiago will allow you to consume the webservice in runtime
(most usefull), here's a very simple trick to enable you to add the reference to your oml:

- when entering the url, provide user and password like this: https://user:pass@server[:port]/wsaddress

Hope this helps

Afonso Metello
UserImage.jpg
Gonçalo Marques
Hi Afonso,
Thanks for your help,

I still can't add the web reference to my project.

The web reference address is: https://sgctstw.sgctst.msdev.pt/v251/services/carddocuments.asmx?WSDL


I'm trying to add the web reference this way:

https://user:pass@sgctstw.sgctst.msdev.pt/v251/services/carddocuments.asmx?WSDL

but it still gives me the error: "Access Denied(error:401)".


Am i doing something wrong? Is there something missing?


Thanks for your help,
Gonçalo Marques
2011-08-23 22-04-05
Tiago Simões
Staff
Hi Gonçalo,

Did you put the user and password in the url correctly? It might be possible that the server does not support basic authentication, only integrated authentication.
If that is the case you could save the WSDL on the file system, use the extension mentioned above to do the authentication at runtime, and then use OutSystems Service Center to change the effective url (you will need to republish the eSpace after that).

Cheers,
Tiago Simões
UserImage.jpg
Debasis Sahoo

Do we still need EnhancedWebReferences Extension for basic authentication for a SOAP service or there is any new way of doing it in version 10 ?

2019-09-30 07-35-56
Aurelio Junior

Hi Debasis,

You still have to use the extension.

UserImage.jpg
Stanley Mok

Hi Debasis,

Please see this thread on how to use EnhancedWebReferences to authenticate a SOAP service.

https://www.outsystems.com/forums/discussion/21680/how-to-add-soap-header/

UserImage.jpg
Debasis Sahoo
Solution

Hi Stanley,

Thanks for the clarification. I was wondering if any new methodology came into picture with V10.

Anyways, so far as my work is getting done in an efficient way, i don't have any issues :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.