Hi thomas
I was doing exactly what you had suggested in your mail. But then for
some reason the username and password are not being sent as an header.
The only way i could add a header was to override the GetWebRequest()
method and then add any header i wanted to add. But i guess there must
be some way to do it directly without taking such pain.
Do you think I might be missing something here ?
Thanks for your time.
Vidyanand
-----Original Message-----
From: [EMAIL PROTECTED]
Sent: Mon 5/20/2002 6:56 PM
To: [EMAIL PROTECTED]
Cc:
Subject: RE: Calling a secure Axis web service with .net client
Have a look to what I sent earlier in the mailing list but
something like that should do it (FirstServiceService is the C#
generated for my service when I do the add web reference):
FirstService.FirstServiceService
firstService = new FirstService.FirstServiceService ();
firstService.Url =
FIRST_SERVICE_END_POINT_URL;
// I am not 100% since documentation is not very
clear, but it seems that without the
// PreAuthenticate, every operation call will
always be two HTTP requests: one without
// the Authentication header (then a
WWW-Authenticate header is returned in the access
// denied), then a second request with the
Authentication header. I was hoping that this
// will also do the trick to be able to use the
unauthenticatedIdentity of JBoss, but the
// first request still expect the
WWW-Authenticate header before sending the Authentication
// one.
firstService.PreAuthenticate =
true;
firstService.Credentials = new
NetworkCredential (userName, userPassword);
-----Original Message-----
From: Vidyanand Murunikkara [ mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 7:53 PM
To: [EMAIL PROTECTED]
Subject: Calling a secure Axis web service with .net client
HI
i have a Web service running using Axis. I have turned on HTTP
Authentication for this. So the only way i can access this service(
verified using some handlers ) is to have a username and password .
If i have a client generated using axis then in the Client stub
i can set the Username and password.
But does anyone know how i can access this web service from a
.net client. I havent been able to figure out a way to set the username
and password headers required for the web service in .net. ( I am using
C# clients ).
Thanks for looking into this.
Vidyanand.
<<winmail.dat>>
