This data.gov website提供了一个OData数据导出,其中包含使用链接http://data.cms.gov/OData.svc/97k6-zzx3的说明

(在NugetingService5.6.1版之后)我尝试在Visual Studio2012或Visual Studio2013中使用指向我的C#项目的“添加服务引用”的完整链接,我得到There was an error downloading 'http://data.cms.gov/OData.svc/97k6-zzx3/_vti_bin/ListData.svc/$metadata'. The request failed with HTTP status 404: Not Found. ...

如果我将URL截断为http://data.cms.gov/OData.svc,那么我会得到进一步的结果,但仍然是一个错误The custom tool 'DataServicesCoreClientGenerator' failed. Data service client code-generation failed: Schema specified is not valid. Errors: ... The 'Name' attribute is invalid - the value '97k6-zzx3' is invalid according to its datatype (我想是因为C#标识符不能以数字开头)。

这是data.cms.gov或Visual Studio (等)的错误吗?是否有近距离的变通方法?
谢谢!
发布于 2014-03-14 22:51:31
尝试使用https://data.cms.gov/OData.svc/$metadata。代码生成需要元数据,上面的URL将提供元数据。
URL是服务文档,而不是元数据。
https://stackoverflow.com/questions/22407728
复制相似问题