Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows Azure

Windows Azure Marketplace DataMarket (part 1) - WCF Data Services and Publicly Consumable Data Feeds

7/16/2011 3:46:49 PM

1. WCF Data Services and Publicly Consumable Data Feeds

Windows Azure Marketplace DataMarket, is a service Microsoft offers through Windows Azure that facilitates the publishing and hosting of data by using Windows Communication Foundation (WCF) Data Services, so organizations and individuals can consume that data via a subscription model. For example, you’ll use the U.S. Crime Data statistics data service (DATA.gov) to build a dashboard in SharePoint by using Microsoft Excel Services, and then integrate that data into SharePoint by using a WCF service. There are, of course, many types of DataMarket data feeds that you can explore and use in your application development.

Through the Marketplace DataMarket, you can publish data sets to the cloud, host them on Windows Azure, and then facilitate consumption of your data feed by using Representational State Transfer (REST). REST provides lightweight access to web-based data by using various standards or protocols, such as the Open Data Protocol (oData). oData applies web technologies such as HTTP, the Atom Publishing Protocol (AtomPub), and JavaScript Object Notation (JSON) to access information from different web-based sources. These web-based sources can range from relational databases and file systems to web and content management systems—and of course, include information that resides in normal websites. An open-standards protocol provides guidance on oData through the site http://www.odata.org/. Using oData, you can both publish and consume data feeds. You can publish data by using WCF Data Services, and you can consume it using REST Uniform Resource Identifiers (URIs) that expose the data in different formats (such as AtomPub). The results can be consumed by a browser or used in application development.

Microsoft provides a free-for-use oData data set (called Northwind), available at http://services.odata.org/Northwind/Northwind.svc/Customers. When you navigate to this URI by using your web browser, the returned customer data looks similar to the XML code snippet shown in Example 2-1. (You should take note that, by default, Windows Internet Explorer and many other browsers render this as an RSS feed, so you may have to turn this return data feed off to see the data as XML.)


Note:

The returned XML data shown in Example 1 is a trimmed snippet from the full returned data and includes only two customers: ALFKI and ANATR.


Example 1. Two-customer snippet of the full customer XML from Northwind
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xml:base="http://services.odata.org/northwind/Northwind.svc/" xmlns:d="http://
schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/
ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">Customers</title>
<id>http://services.odata.org/Northwind/Northwind.svc/Customers</id>
<updated>2010-11-27T20:34:27Z</updated>
<link rel="self" title="Customers" href="Customers" />
<entry>
<id>http://services.odata.org/northwind/Northwind.svc/Customers('ALFKI')</id>
<title type="text" />
<updated>2010-11-27T20:34:27Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Customer" href="Customers('ALFKI')" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Orders"
type="application/atom+xml;type=feed" title="Orders" href="Customers('ALFKI')/Orders"
/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/
related/CustomerDemographics" type="application/atom+xml;type=feed"
title="CustomerDemographics" href="Customers('ALFKI')/CustomerDemographics" />
<category term="NorthwindModel.Customer" scheme="http://schemas.microsoft.com/
ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:CustomerID>ALFKI</d:CustomerID>
<d:CompanyName>Alfreds Futterkiste</d:CompanyName>
<d:ContactName>Maria Anders</d:ContactName>
<d:ContactTitle>Sales Representative</d:ContactTitle>
<d:Address>Obere Str. 57</d:Address>
<d:City>Berlin</d:City>
<d:Region m:null="true" />
<d:PostalCode>12209</d:PostalCode>
<d:Country>Germany</d:Country>
<d:Phone>030-0074321</d:Phone>
<d:Fax>030-0076545</d:Fax>
</m:properties>
</content>
</entry>
<entry>
<id>http://services.odata.org/northwind/Northwind.svc/Customers('ANATR')</id>
<title type="text" />
<updated>2010-11-27T20:34:27Z</updated>
<author>
<name />
</author>
<link rel="edit" title="Customer" href="Customers('ANATR')" />
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Orders"
type="application/atom+xml;type=feed" title="Orders" href="Customers('ANATR')/Orders"
/>
<link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/
related/CustomerDemographics" type="application/atom+xml;type=feed"
title="CustomerDemographics" href="Customers('ANATR')/CustomerDemographics" />
<category term="NorthwindModel.Customer" scheme="http://schemas.microsoft.com/
ado/2007/08/dataservices/scheme" />
<content type="application/xml">
<m:properties>
<d:CustomerID>ANATR</d:CustomerID>
<d:CompanyName>Ana Trujillo Emparedados y helados</d:CompanyName>
<d:ContactName>Ana Trujillo</d:ContactName>
<d:ContactTitle>Owner</d:ContactTitle>
<d:Address>Avda. de la Constitución 2222</d:Address>
<d:City>México D.F.</d:City>
<d:Region m:null="true" />
<d:PostalCode>05021</d:PostalCode>
<d:Country>Mexico</d:Country>
<d:Phone>(5) 555-4729</d:Phone>
<d:Fax>(5) 555-3745</d:Fax>
</m:properties>
</content>
</entry>
...
<link rel="next" href="http://services.odata.org/Northwind/Northwind.svc/
Customers?$skiptoken='ERNSH'" />
</feed>


You can, for example, issue queries through a specific REST query syntax to return more detailed information. For example, http://services.odata.org/Northwind/Northwind.svc/Customers(‘ALFKI’) returns only the information for the customer with the ID ALFKI.


Note:

More Info To learn more about oData, visit http://www.odata.org/.


After the data has been returned to the calling application, you can parse the XML and use the underlying data in your application. To do this, you would use standard XML objects (such as XDocument or XElement) or custom classes and list collections to manage the data internally in your application.

As mentioned earlier, you use WCF Data Services (formerly Microsoft ADO.NET Data Services) to expose a data set for public (or subscription) consumption.You’ll use services that have already been published to the DataMarket by using WCF Data Services, and you’ll learn how to consume those services in your applications.


Note:

More Info To learn more about WCF Services, visit http://msdn.microsoft.com/en-us/library/cc668794.aspx.


Other -----------------
- Accessing the Surveys Application : Content Delivery Network
- Accessing the Surveys Application : Authentication and Authorization
- Working with Data in the Surveys Application : Using SQL Azure
- Using Cloud Services : Collaborating on Contact Management - Exploring Contact Management and CRM Applications
- Using Cloud Services : Collaborating on Event Management - Exploring Event Management Applications
- Working with Data in the Surveys Application : Displaying Data (part 3) - Displaying Questions & Displaying the Summary Statistics
- Working with Data in the Surveys Application : Displaying Data (part 2) - Session Data Storage
- Working with Data in the Surveys Application : Displaying Data (part 1) - Paging through Survey Results
- Microsoft Azure: Enterprise Application Development - Queue Storage
- Microsoft : Azure Enterprise Application Development : Web Role
- Microsoft Azure: Enterprise Application Development - Worker Roles
- Working with Data in the Surveys Application : Saving Survey Response Data
- Working with Data in the Surveys Application : Testing and Windows Azure Storage
- Working with Data in the Surveys Application : A Data Model for a Multi-Tenant Application
- Enterprise Application Development : Azure Monitoring and Diagnostics
- Enterprise Application Development : Azure Diagnostics­ under the hood & Enabling diagnostic logging
- Building a Scalable, Multi-Tenant Application for Windows Azure : Scaling the Surveys Application
- Building a Scalable, Multi-Tenant Application for Windows Azure : Scaling Applications by Using Worker Roles
- Building a Scalable, Multi-Tenant Application for Windows Azure : On-Boarding for Trials and New Customers
- Introduction to SQL Azure : Creating our database
 
 
Most view of day
- Protecting Windows from Viruses and Spyware : Antimalware Strategy: Defense in Depth (part 3) - Data Execution Prevention
- Microsoft Dynamic AX 2009 : Working with .NET Business Connector (part 1) - Processing Requests and Responses
- Managing Client Protection : Using Windows Defender (part 1)
- Microsoft Excel 2010 : SUBTOTAL Function, Subtotal Tool
- Microsoft Dynamics Ax 2009 : RunBase Framework Extension (part 3) - Adding Property Methods, Adding Constructors
- Working with the Windows Home Server Registry : Keeping the Registry Safe
- Windows 7 Mobility Features : Power Management (part 2) - Power Options Control Panel
- Windows Server 2003 : Protecting Hosts with Windows Host Firewalls - Protocol Filters
- Microsoft Lync Server 2013 : Office 365 and Lync Online - System Requirements
- Microsoft Dynamics AX 2009 : Integration with Microsoft Office - Sending email using Outlook
Top 10
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 3) - Creating IPv4 DHCP Scopes
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 2) - Installing DHCP Server and Server Tools
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 1)
- Windows Server 2012 : DHCP,IPv6 and IPAM - Understanding the Components of an Enterprise Network
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 3) - Translating Text with the Mini Translator
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 2) - Translating a Word or Phrase with the Research Pane
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 1) - Setting Options for the Research Task Pane, Searching with the Research Task Pane
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 2) - Ending a Linked Notes Session, Viewing Linked Notes
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 1) - Beginning a Linked Notes Session
- Microsoft OneNote 2010 : Doing Research with Side Notes (part 3) - Moving Side Notes to Your Existing Notes
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro