You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Jones, Rhys" <Rh...@SierraSystems.com> on 2002/06/11 18:34:43 UTC

.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