The eXtreme Scale REST data service creates ATOM feeds
by default when using a web browser. The ATOM feed format may not
be compatible with older browsers or may be interpreted such that
the data cannot be viewed as XML. The following topics provide details
on how to configure Internet Explorer Version 8 and Firefox Version
3 to display the ATOM feeds and XML within the browser.
About this task
The eXtreme Scale REST data service creates ATOM feeds by
default when using a web browser. The ATOM feed format may not be
compatible with older browsers or may be interpreted such that the
data cannot be viewed as XML. For older browsers, you will be prompted
to save the files to disk. Once the files are downloaded, use your
favorite XML reader to look at the files. The generated XML is not
formatted to be displayed, so everything will be printed on one line.
Most XML reading programs, such as Eclipse, support reformatting
the XML into a readable format.
For modern browsers, such as Microsoft
Internet Explorer Version 8 and Firefox Version 3, the ATOM XML files
can be displayed natively in the browser. The following topics provide
details on how to configure Internet Explorer Version 8 and Firefox
Version 3 to display the ATOM feeds and XML within the browser.
Once
the browser is configured, see section for example URLs.
Procedure
Configuring Internet Explorer Version 8
- To enable Internet Explorer to read the ATOM feeds that
the REST data service generates use the following steps, as shown
in :
- Click
- Select the Content tab
- Click the Settings button in the Feeds and
Web Slices section
- Uncheck the box: "Turn on feed reading view"
- Click OK to return to the browser.
- Restart Internet Explorer.
Configuring Firefox Version 3
- Firefox does not automatically display pages with content
type: application/atom+xml. The first time a page is displayed,
Firefox prompts you to save the file. To display the page, open the
file itself with Firefox as follows:
- From the application chooser dialog box, select the
"Open with" radio button and click the Browse button.
- Navigate to your Firefox installation directory. For
example: C:\Program Files\Mozilla Firefox
- Select firefox.exe and hit the OK button.
- Check the “Do this automatically for files like this…”
check box.
- Click the OK button.
- Next, Firefox displays the ATOM XML page in a new browser
window or tab
- Firefox automatically renders ATOM feeds in readable format.
However, the feeds that the REST data service creates include XML.
Firefox cannot display the XML unless you disable the feed renderer.
Unlike Internet Explorer, in Firefox, the ATOM feed rendering plug-in
must be explicitly edited. To configure Firefox to read ATOM feeds
as XML files, follow these steps:
- Open the following file in a text editor: <firefoxInstallRoot>\components\FeedConverter.js.
In the path, <firefoxInstallRoot> is the root
directory where Firefox is installed.
For Windows operating
systems, the default directory is: C:\Program Files\Mozilla
Firefox.
- Search for the snippet that looks as follows:
// show the feed page if it wasn't sniffed and we have a document,
// or we have a document, title, and link or id
if (result.doc && (!this._sniffed ||
(result.doc.title && (result.doc.link || result.doc.id)))) {
- Comment out the two lines that begin with if and result by
placing // (two forward slashes) in front of them.
- Append the following statement to the snippet: if(0)
{.
- The resulting text should look as follows:
// show the feed page if it wasn't sniffed and we have a document,
// or we have a document, title, and link or id
//if (result.doc && (!this._sniffed ||
// (result.doc.title && (result.doc.link || result.doc.id)))) {
if(0) {
- Save the file.
- Restart Firefox
- Now Firefox can automatically display all feeds in the
browser.
Example
Example URLs
This section describes some URLs that can
be used to view the data that was added by the getting started sample
provided with the eXtreme Scale REST data service. Before using the
following URLs, add the default data set to the eXtreme Scale sample
grid using either the sample Java client (see section ) or the sample
Visual Studio WCF Data Services client (see section ).
The following
examples assume the port is 8080 which can vary. See section for
details on how to configure the REST data service on different application
servers.
- View a single customer with the id of "ACME": http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/Customer('ACME')
- View all of the orders for customer "ACME": http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/Customer('ACME')/orders
- View the customer "ACME" and the orders: http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/Customer('ACME')?$expand=orders
- View order 1000 for customer "ACME": http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/Order(orderId=1000,customer_customerId='ACME')
- View order 1000 for customer "ACME" and its associated Customer:
http://localhost:8080/wxsrestservice/restservice/
NorthwindGrid/Order(orderId=1000,customer_customerId='ACME')?$expand=customer
- View order 1000 for customer "ACME" and its associated Customer
and OrderDetails: http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/
Order(orderId=1000,customer_customerId='ACME')?$expand=customer,orderDetails
- View all orders for customer "ACME" for the month of October,
2009 (GMT): http://localhost:8080/wxsrestservice/restservice/NorthwindGrid/Customer(
customerId='ACME')/orders?$filter=orderDate
ge datetime'2009-10-01T00:00:00' and orderDate lt datetime'2009-11-01T00:00:00'
- View all the first 3 orders and orderDetails for customer "ACME"
for the month of October, 2009 (GMT): http://localhost:8080/wxsrestservice/restservice/
NorthwindGrid/Customer(customerId='ACME')/orders?$filter=orderDate
ge datetime'2009-10-01T00:00:00' and
orderDate lt datetime'2009-11-01T00:00:00'&$orderby=orderDate&$top=3&$expand=orderDetails