Title: RE: .Net Client for Axis Service

Thanks Vidyanand,

I can't get the method of sending the WWW-Authenticate header back to the client to work.  I am curious of how you changed the GetWebRequest() method to send the correct headers.  It does seem like the hard way to do it, but it sounds like the only way that works so far.

I posted a message to an MS forum to see if they had any answers as to why the .Net client won't send the auth headers.  I'll let you know if anything comes out of it.

Thanks for your help,

RJ

>List:     axis-user
>Subject:  RE: .Net Client for Axis Service
>From:     "Vidyanand Murunikkara" <[EMAIL PROTECTED]>
>Date:     2002-06-11 19:40:11
>
>Hi Rhys
>
>check this out http://marc.theaimsgroup.com/?l=axis-user
><http://marc.theaimsgroup.com/?l=axis-user&m=102224516027914&w=2>
>&m=102224516027914&w=2  . Similar problem But there is no good solution
>to it.
>
>But there is one way you can make it send the required headers. But it
>involves changing the Client code quite a bit. Let me know if you want
>such a solution. And I am not sure whether it will break other stuff in
>.net.
>
>Vidyanand
>
>-----Original Message-----
>From: Jones, Rhys [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 11, 2002 9:35 AM
>To: '[EMAIL PROTECTED]'
>Subject: .Net Client for Axis Service
>
>
>
>Hi,
>
>I'm sorry if this is off topic, but here I go.....
>
>I am trying to get a .Net client to talk to an existing Axis service
>which works with java clients.  Right now access to the service is
>controlled using a handler that checks basic authentication.  At first I
>used the following C# client code to access the service:
>
>               ResourceServices service = new ResourceServices();
>               service.PreAuthenticate = true;
>
>               NetworkCredential myCred = new
>NetworkCredential("user","pass");
>                CredentialCache myCache = new CredentialCache();

>                myCache.Add(new Uri(service.Url), "Basic", myCred);
>                       
>                service.Credentials = myCache;
>                Result.Text = service.getUserResources(email,period);
>
>With this code the handler throws an AxisFault since it is not getting
>any auth information in the header.  The "PreAuthenticate" seems to do
>nothing.  I read some earlier posts which indicated that if I got the
>handler to return a "401" that the .net client would then send the auth
>header.
>
>I then made a servlet that checks if there is any auth info in the
>header and which forwards the request to the Axis servlet if there was
>or returned a 401 response if there wasn't.  Again no luck.  The .net
>client just threw an error that a 401 was returned.

If anyone could help me out with this it would be much appreciated!

Again, sorry if it is off topic.

Thanks!

RJ

Reply via email to