axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.che...@ascentialsoftware.com
Subject RE: .Net Client for Axis Service
Date Tue, 11 Jun 2002 23:17:03 GMT
That should be fine. Thanks for the pointers, which is all I really needed.

Thomas

-----Original Message-----
From: Vidyanand Murunikkara [mailto:Vidyanand@infravio.com]
Sent: Tuesday, June 11, 2002 7:08 PM
To: axis-user@xml.apache.org
Subject: RE: .Net Client for Axis Service


Hi Thomas
 
I dont remember the exact code that i changed. But basically it involves
overriding the GetWebRequest Method in the Client. Inside this method
you do a GetWebRequest on the base class . TO this  webrequest add the
http header manually and then  return it.
 
Hope this helps. But if you really are interested in seeing what i
exactly did, I can look it up for you when I find sometime.
 
Vidyanand.

-----Original Message-----
From: thomas.cherel@ascentialsoftware.com
[mailto:thomas.cherel@ascentialsoftware.com]
Sent: Tuesday, June 11, 2002 3:09 PM
To: axis-user@xml.apache.org
Subject: RE: .Net Client for Axis Service



I think that returning 401 is not enough. You need to return 401 and the
WWW-Authenticate header so the .NET client understands that it has to
retry by sending authentication information.

Vidyanand, I will be interested to understand what you mean by changing
the client code quite a bit. Did you find a way to force the .NET client
to send the authenticate header right away? If yes, I will be interested
to know how you did that.

Thomas 

-----Original Message----- 
From: Vidyanand Murunikkara [ mailto:Vidyanand@infravio.com
<mailto:Vidyanand@infravio.com> ] 
Sent: Tuesday, June 11, 2002 3:40 PM 
To: axis-user@xml.apache.org 
Subject: RE: .Net Client for Axis Service 


Hi Rhys 
  
check this out http://marc.theaimsgroup.com/?l=axis-user
<http://marc.theaimsgroup.com/?l=axis-user>  
< http://marc.theaimsgroup.com/?l=axis-user
<http://marc.theaimsgroup.com/?l=axis-user&m=102224516027914&w=2>
&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:RhysJones@SierraSystems.com
<mailto:RhysJones@SierraSystems.com> ] 
Sent: Tuesday, June 11, 2002 9:35 AM 
To: 'axis-user@xml.apache.org' 
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 

Mime
View raw message