Astoria Metadata

Astoria Data Servers have an obvious comparison with custom written Web Services that include methods that return packets of XML data. In making the comparison people want to be sure that all of the boxes that are checked for web services are also checked for Astoria Data Services. One of these boxes is discoverability. Web Services expose WSDL so that clients can discover their methods, parameters and return results. Astoria Data Services expose some of this information in a ’root’ node of the service. For example:-

http://localhost:1234/Northwind.svc

This returns an XML packet listing all of the entities (tables, views, stored procedures etc.) exposed by the service. What it doesn’t expose, however, is custom methods. As custom methods might arguably be used more frequently this is rather important. The trick to discovering these methods is to know the undocumented (at the time of writing) switch, $sys_GetEdmSchema. For example:-

http://localhost:1234/Northwind.svc/$sys_GetEdmSchema

(Note that "$sys_GetEdmSchema" will change to "$metadata" or "$sys_metadata" in the release after the September 2007 CTP.)

The result is an EntityContainer element including a FunctionImport element:-

FunctionImport Name="CustomersByCountry"

This also includes a list of Parameter elements. Problem solved.

Technorati Tags: Astoria

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: Guy Smith-Ferrier
Posted on: Tuesday, November 06, 2007 at 4:01 PM
Categories: Miscellaneous - Technical
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Comments