Sample .NET Console Client Application

Dayforce SOAP Web Services Developer Guide

Version
R2024.2.0
Sample .NET Console Client Application

The code provided in this section is a sample only, and not production ready code. You must add the code qualities needed to make it production ready, such as better error handling.

The following instructions are specific to .NET. For Java instructions on creating the proxy, see the readme.txt file included in the Java sample code.

Create a Project

To create a project in Visual Studio:

  1. In Visual Studio, go to File > New > Project.
  2. Click Console Application.
  3. Name the console application DayforceServiceSampleClient.

Add a Service Reference

To add a service reference:

  1. In the Solution Explorer, right-click the DayforceServiceSampleClient project and select Add > Service Reference.
  2. In the Add Service Reference dialog box:
    1. Set the Address to https://www.dayforcehcm.com/DataSvc/DayforceService.svc?wsdl and the Namespace to DayforceService:
  3. Add Service Reference window.

To complete the sample client application, insert the logic shown in the following sections into the Main method in the Program.cs source file, then compile and execute.

Increase the maxReceivedMessageSize property binding information generated in your app.config or web.config to the largest possible value to accommodate the large amount of data that can be received from the Dayforce web services.