?
Solved

How to Invoke the class from Webservice to C#

Posted on 2011-03-02
2
Medium Priority
?
401 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

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

Assisted Solution

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

Export.ExportEmployees(your parameters)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month10 days, 6 hours left to enroll

765 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