Updating a SharePoint list with an external data source (Part 2)

Our goal in Part 2 will be to write a SharePoint external data source application that can access the ADP Employease web service and retrieve and display data. In order to simplify the code and display process, we will be creating a console application in Visual Studio. Make sure to target Microsoft .NET Framework 2.0

console application in Visual Studio

Add a reference to WSE 3.0
In order to instantiate a UserToken conforming to the WS-I basic security profile, we will need to add a reference to the WSE 3.0 package.

Add a reference to WSE 3.0

This can be done in Solution Explorer by right clicking the TestApp project and clicking on the WSE Settings 3.0 item in the menu.

enable the project for Web Services

On the General tab, click the checkbox to enable the project for Web Services. 

Add a web reference using WSDL
Adding a web reference allows the .NET framework to auto-generate most of the functionality necessary to make a web service call.

Add a web reference using WSDL

This can be done using the main menu items Project->Add Reference. Right click on the TestApp project and click on the Add Web Reference item in the menu.

This should bring up the “Add Web Reference” pop-up, which is shown below.

Add Web Reference

Although ADP offers many different web service WSDLs, we will only be using the GetEmployeePersonalInfo web service. Enter the URL into the pop-up and click the Go button. Grab GetEmployeePersonalInfo WSDL here.

Once the pop-up is finished fetching the WSDL and accompanying schema definitions, it should display the –GetEmployeePersonalInfo method in the “Web services found at this URL” box. Click the “Add Reference” button on the right hand side of the pop-up to finish adding this web reference.

Once the reference has been added, all of the objects required to send a GetEmployeePersonalInfo request have been created. We are now ready to begin writing code.

In our next installment, we will be building a simple web service request to ADP and displaying a dataset in the console window.

January 18, 2013