Need autentication to access a web reference

Need autentication to access a web reference

  
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
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
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: http://user:pass@server[:port]/wsaddress

Hope this helps

Afonso Metello
Hi Afonso,
Thanks for your help,

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

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


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

http://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
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