Solved

How to Invoke the class from Webservice to C#

Posted on 2011-03-02
2
396 Views
Last Modified: 2012-05-11
        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]));
        }

Open in new window



The namespace for my webservice is "AWService {"

The above code in my webservice,i added this webservice in my c# console application,but how can i call this class and pass the string.

my console applicaton code.

namespace AWebservice
{

   public class Program
    {
        public static void Main(string[] args)
        {
            AWService.AEmployeeExport export = new AWService.DLAEmployeeExport()
           

        }
    }
}

Open in new window


how can i pass the string and am not able to invoke those method.Thanks in Advance !
0
Comment
Question by:Sha1395
2 Comments
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 250 total points
ID: 35026501
0
 
LVL 17

Assisted Solution

by:Jesse Houwing
Jesse Houwing earned 250 total points
ID: 35027628
After creating the AWService.AEEmployeeExport class, you should be able to call:

Export.ExportEmployees(your parameters)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now