Click here to Skip to main content
15,921,226 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I added java webservices using add web reference in visual studio.
I am calling in the .net client like this. But still service asking to send username password..what might be the problem???
C#
try
            {
                //Proxy creation
               var proxy = new myservice();

                var credentials = new NetworkCredential();
                credentials.UserName = "username";
                credentials.Password = "password";

                //Credential
                proxy.Credentials = credentials;

               //Service call
                lblResponse.Text = proxy.getServerTime();
            }
            catch (Exception ex)
            {
                lblResponse.Text = ex.Message;
            }

Can anybody help me out.
Thanks.
Posted
Updated 4-Oct-12 5:22am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900