Product overview > Tutorials, examples, and samples > REST data services sample and tutorial
Visual Studio 2008 WCF client with REST data service
The eXtreme Scale REST data service getting started sample includes a WCF Data Services client that can interact with the eXtreme Scale REST data service. The sample is written as a command-line application in C#.
Software requirements
The WCF Data Services C# sample client requires the following:
- Operating system
- Microsoft Windows XP
- Microsoft Windows Server 2003
- Microsoft Windows Server 2008
- Microsoft Windows Vista
Microsoft Visual Studio 2008 with Service Pack 1
Tip: See the previous link for additional hardware and software requirements.
- Microsoft .NET Framework 3.5 Service Pack 1
- Microsoft Support: An update for the .NET Framework 3.5 Service Pack 1 is available
Accept and running the getting started client
The WCF Data Services sample client includes a Visual Studio 2008 project and solution and the source code for running the sample. The sample must be loaded into Visual Studio 2008 and compiled into a Windows runnable program before it can be run. To build and run the sample, see the text document: restservice_home/gettingstarted/VS2008_README.txt.
WCF Data Services C# client command syntax
WXSRESTGettingStarted.exe <service URL> <command>
The <service URL> is the URL of the eXtreme Scale REST data service configured in section .
The following commands are available:
- load default
Loads a predefined set of Customer, Category and Product entities into the data grid and creates a random set of Orders for each customer.
- load category <categoryId> <categoryName> <firstProductId> <numProducts>
Creates a product Category and a fixed number of Product entities in the data grid. The firstProductId parameter identifies the id number of the the first product and each subsequent product is assigned the next id until the specified number of products is created.
- load customer <companyCode> <contactName> <companyName> <numOrders> <firstOrderId> <shipCity> <maxItems> <discountPct>
Loads a new Customer into the data grid and creates a fixed set of Order entities for any random product currently loaded in the data grid. The number of Orders is determined by setting the <numOrders> parameter. Each Order will have a random number of OrderDetail entities up to <maxItems>
- display customer <companyCode>
Display a Customer entity and the associated Order and OrderDetail entities.
- display category <categoryId>
Display a product Category entity and the associated Product entities.
- unload
Remove all entities that were loaded using the "default load" command.
The following examples illustrate various commands.
- WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load default
- WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load customer
- IBM "John Doe" "IBM Corporation" 5 5000 Rochester 5 0.05
- WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid load category 5 "Household Items" 100 5
- WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid display customer IBM
- WXSRestGettingStarted.exe http://localhost:8080/wxsrestservice/restservice/NorthwindGrid display category 5
Parent topic:
REST data services sample and tutorial
Related concepts
Related tasks
Configure application servers for the REST data service
Use a browser with REST data services
Use a Java client with REST data services
Related reference