Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

This the windows application code,very simple create four text box and button.

getting user name,password and date pass this string to my webservice and get the result from webservice and store those in the result text box.

C#
namespace CallWebService
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
        }
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
        }
        private void textBox2_TextChanged(object sender, EventArgs e)
        {
        }
        private void button1_Click(object sender, EventArgs e)
        {
            String username, pwd, date;
            username = textBox1.ToString();
            pwd = textBox2.ToString();
            date = textBox3.ToString();

        }
    }
}




but when i try to invoke my webservice in my button click its not even calling the method i want to invoke.


below is the method i wanna invoke in my windows application

MIDL
public EmployeeExport[] ExportEmployees(string LoginName, string Password, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] System.Nullable<System.DateTime> LastExport, out string ErrorMessage) {
    object[] results = this.Invoke("ExportEmployees", new object[] {
                LoginName,
                Password,
                LastExport});
    ErrorMessage = ((string)(results[1]));
    return ((DLAEmployeeExport[])(results[0]));
}


The namespace am using for this webservice is

"namespace WService "

In my code i was trying to call like below

WService.EmployeeExport (and pass the string).

But its not show the method EmployeeExport.

Any Help ! please
Posted

1 solution

 
Share this answer
 

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