Preparing your environment --Beta Release--
To set up your environment, install the following packages:
- Microsoft Visual Studio 2003 or higher
- .NET Framework 1.1 or higher
We recommend that you use Microsoft Visual Studio 2008. We also recommend that you use .NET Framework 2.0 to ensure that the sample client application compiles correctly.
Generating Client-Side stub classes for Urchin Data API services
To access Urchin Data API services, you need to invoke a remote call on SOAP or HTTP. To do this, the client must have the Web Service endpoint location and a handle to the Web Services interface. These remote interfaces, client side service locators, and stubs are generated by Web Services Description Language Tool (wsdl.exe).
To generate an XML Web Service Proxy Class:
1. Navigate to the "$Microsoft Visual Studio Install Directory$\SDK\v2.0\Bin" directory
2. Run the following command for generating AdminService client-side stub class:
wsdl.exe http://server[:port]/services/v1/adminservice?wsdl /language:CS /protocol:SOAP /namespace:SampleCode.com.google.DataAPI.AdminService /out:AdminService.cs
3. Copy the generated AdminService.cs into the project folder and add it to the project.
4. Run the following command for generating ReportService client-side stub class:
wsdl.exe http://server[:port]/services/v1/reportservice?wsdl /language:CS /protocol:SOAP /namespace:SampleCode.com.google.DataAPI.ReportService /out:ReportService.cs
5. Copy the generated ReportService.cs into the project folder and add it to the project.
The following stub class sample code files are generated by the WSDL tool for the Urchin Data API services:
-
AdminService.cs – .NET C# stub class for AdminService API.
-
ReportService.cs – .NET C# stub class for ReportService API.
.NET C# Client Examples
-
SOAP_NET Example 1 (v1): Retrieving the list of accounts for an authenticated user
-
SOAP_NET Example 2 (v1): Retrieving the list of profiles for a specified account
-
SOAP_NET Example 3 (v1): Getting a list of tables for a profile and the supported dimensions/metrics
-
SOAP_NET Example 4 (v1): Retrieving data for specified dimensions and metrics