About us |  Help us improve
intelliVERB - Get a fair search of the Internet !
Visual studio .net
SQL Server
Oracle
Main  >  Web Service  >  Client service Email this page to friend
Client service
 
 
 
 
 
C#Client serviceTop

 /// <summary>
 /// MyClientService is the client side class
 /// It is actually the client webservice class
 /// Console application
 /// </summary>

 class MyClientService
 {
  /// <summary>
  /// The main entry point for the application.
  /// </summary>

  [STAThread]
  static void Main(string[] args)
  {
   try
   {
    //TestWS is the web reference to TestWebService
    TestWS.MyWebService MyWS=new TestWS.MyWebService();
    
    //set values for authentication properties
    TestWS.Authentication MyAuthorization=new TestWS.Authentication();
    MyAuthorization.Client_Id=123456;
    MyAuthorization.Client_Code="abc123";
    MyAuthorization.Client_Token="XDEVGFG-jjgfgfg-1264644-hfgfgfg";
    MyWS.AuthenticationValue=MyAuthorization;

    //Create a new employee object
    TestWS.Employee oEmpl = new TestWS.Employee();
    oEmpl.SSN="145-547-8745";
    oEmpl.FirstName="James";
    oEmpl.LastName="Madison";
    //
    //Create a new enmployee

    bool bSuccess=MyWS.Process_NewEmployee(oEmpl);
    if (! bSuccess)
    {
     //Log error processing new employee message
     return;
    }
    //Update employee benefits
    oEmpl.HasMedical=true;
    oEmpl.HasDental=true;
    oEmpl.HasVision=false;

    //Process employee benefit
    bSuccess=MyWS.Process_EmployeeBenefit(oEmpl);
    if (! bSuccess)
    {
     //Log error processing employee benefit message
     return;
    }
    //Update employee payroll
    oEmpl.Salary=50000;
    oEmpl.Vacation=12;
    //Process employee payroll information
    bSuccess=MyWS.Process_EmployeePayroll(oEmpl);
    if (! bSuccess)
    {
     //Log error processing employee payroll message
     return;
    }
   }
   catch (Exception ex)
   {
    //Log error message
    return;
   }
  }
 }

You last visited
ASP .Net definitions
Event log
DELETE Oracle
Web method
SELECT Oracle
Assemblies
CREATE SQL Server
Windows service
COM +
Web service Interview Q.
 
 
Make a secure donation now with PayPal!