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 Neil Aggarwal <ne...@JAMMConsulting.com> on 2006/07/08 22:39:44 UTC

[Axis 1.4] Username and password not getting to server from C# client

Hello:

I have a web service deployed on Axis 1.4 running on Tomcat.

I have set up an AuthenticationHandler in the request flow
to perform user name and password checking.  It extends 
SimpleAuthenticationHandler and pulls the username and password
from the MessageContext object.

If I use a Java client with this code:

   // Locate the service
   FileUpload_PortType fileUpload = new
FileUploadServiceLocator().getFileUpload();
   ((FileUploadSoapBindingStub)fileUpload).setUsername(USER);
   ((FileUploadSoapBindingStub)fileUpload).setPassword(PASS);

Everything works fine.  I get the user name and password and the
service continues.

But, using this C# code:

    NetworkCredential credential = new NetworkCredential(USER, PASS);
    FileUploadService service = new FileUploadService();
    service.Credentials = credential;
    service.PreAuthenticate = true;

When I invoke the service, the AuthenticationHandler on the server gets
null for the user name and password.

Is this the correct C# code to use?  

Any ideas?

Thanks,
	Neil

--
Neil Aggarwal, JAMM Consulting, (214)986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org