Connect to an Axis 1 Web Service with Basic Authentication


Recently we had to integrate one of our .NET applications with an Axis Web Service using basic authentication over an https connection.

In order to connect to the Web Service and pass the username and password for the basic authentication, we needed to build a proxy for the service and add the authentication header manually. The code for the proxy class is listed bellow. It simply overrides the GetWebRequest method of the service and adds the credentials encoded in base64.

Calling a method of the web service, requires setting the Credentials property of the web service to an instance of NetworkCredentials with username and password.

Another tip that might prove useful when working with web services over https connections, is how to override certificate validation in case you have problems with it during development phase. For this you must simply register a Callback that validates the certificate like in the code bellow.

Finally, there’s another very important peculiarity of what does Cialis that brings it so high above its alternatives. It is the only med that is available in two versions – one intended for use on as-needed basis and one intended for daily use. As you might know, Viagra and Levitra only come in the latter of these two forms and should be consumed shortly before expected sexual activity to ensure best effect. Daily Cialis, in its turn, contains low doses of Tadalafil, which allows to build its concentration up in your system gradually over time and maintain it on acceptable levels, which, consequently, makes it possible for you to enjoy sex at any moment without having to time it.

  • Luis Molina says:

    hi, I need more code from this sample, I dont know what the ProjectRepositoryServiceSoapService comes from.

    thanks in advance..

    January 9, 2012 at 3:00 pm

Comments are closed.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.