Solved

How to Invoke the class from Webservice to C#

Posted on 2011-03-02
2
393 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
Comment Utility
0
 
LVL 17

Assisted Solution

by:ToAoM
ToAoM earned 250 total points
Comment Utility
After creating the AWService.AEEmployeeExport class, you should be able to call:

Export.ExportEmployees(your parameters)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

11 Experts available now in Live!

Get 1:1 Help Now