odata

WCF Data Service QuickStart

泪湿孤枕 提交于 2020-03-23 22:14:50
开放数据协议 (OData) 是一个查询和更新数据的Web协议。OData是基于诸如HTTP和AtomPub的国际标准创建的,它提供了一个跨平台的数据通信的方案。OData应用了web技术如HTTP、Atom发布协议(AtomPub)和JSON等来提供对不同应用程序,服务和存储的信息访问。SharePoint 2010, SQL Server 2008 R2, PowerPivot, Windows Azure Table Storage, 和第三方的产品像 IBM’s WebSphere eXtreme Scale 都使用OData。 首先,WCF Data Services是WCF服务,所以你可以使用所有现有的WCF知识。其次,WCF Data Services已经实现了OData拓扑,于是你可以致力于你的数据格式在你的程序中的表示,而不是AtomPub/JSON这些真正在网络上传递的数据格式。再有,WCF Data Services致力于数据传输,而不是数据存储。你的数据可以存放在任何位置:本地的数据库,云端的数据库,外部的web services,xml文件,等等。无论数据是怎么来的,你都可以用同样的方式来发布/使用它们。 使用Visual Studio 2010里头使用WCF Data Service,就是使用OData发布的Restful服务

OData 1-5 OData语法(下)

久未见 提交于 2020-03-19 02:34:06
接上篇 http://www.cnblogs.com/PurpleTide/archive/2010/12/21/1912299.html  7) $expand 包含属性和关系   假设的WagerInformation拥有一个属性 UserInformation User 表示用户信息, 另一个属性 IEnumerable<CommonInformation> Commons 表示评论信息   使用 http://localhost:9527/ODataService.svc/WagerInformations?$expand=User ,Commons   返回的信息中就会包含相关类 (用于主外键关系)   - -# 如果不手动指定 而是自动关联....那就悲剧了 可能数据库中的所有表都有联系...然后把整个数据库返回.....   以前做过很囧的事情.就是开了级联删除...然后删除了一个很基本的配置项.....整个数据库基本空了 8) $select 查询字段的列表(和sql中select后面的表达式一样)   以下url只想返回查询所有信息的EventName属性    http://localhost:9527/ODataService.svc/WagerInformations?$select=EventName     

OData 1-2 windows 身份验证和OData

放肆的年华 提交于 2020-03-19 02:32:55
windows 身份验证和OData 1.服务器端   1) 集成身份验证     在使用IIS作为服务宿主的情况下,需要打开集成身份验证,关闭匿名身份验证     windows身份验证要求请求中包含以下的http header: (以下例子是服务器发生401时给客户端的错误提示)      WWW-Authenticate: NTLM     WWW-Authenticate: Negotiate     其中NTLM意味着你需要使用windows身份验证     Negotiate意味着客户端可以尝试 Kerberos 身份验证   2)基本身份验证     当你把IIS配置为基本身份验证的时候     服务器返回401会如下所示:      WWW-Authenticate: Basic realm="mydomain.com"     这些信息告诉客户端,需要提供一个给mydomain.com的身份凭据     基本身份验证非常简单,但是并不安全,除非你使用Https 2.客户端   1)浏览器     大多数在遇到http401的时候会弹出一个登录框给用户   2).net客户端应用程序     如果你的程序运行在windows系统下代码如下所示        MyDataContext ctx = new MyDataContext(uri);       ctx

How to fix “[OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager.” error in SSIS?

拈花ヽ惹草 提交于 2020-03-16 06:40:18
问题 I am having problem when running SSIS which extracts data from SharePoint list. SSIS Package was running fine till 2 weeks back and suddenly the package is failing with this error: [OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager. [SSIS.Pipeline] Error: OData Source failed validation and returned error code 0xC020801F. [SSIS.Pipeline] Error: One or more component failed validation. Error: There were errors during task validation Tried:

$expand=manager does not expand manager

陌路散爱 提交于 2020-03-05 07:04:44
问题 When testing https://graph.microsoft.com/v1.0/users/<my-email>/manager , I receive the following response (I replaced values with "HIDDEN"): { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects/$entity", "@odata.type": "#microsoft.graph.user", "id": HIDDEN, "businessPhones": [ HIDDEN ], "displayName": HIDDEN, "givenName": HIDDEN, "jobTitle": "Director, Information Technology", "mail": HIDDEN, "mobilePhone": HIDDEN, "officeLocation": HIDDEN, "preferredLanguage":

$expand=manager does not expand manager

谁都会走 提交于 2020-03-05 07:03:49
问题 When testing https://graph.microsoft.com/v1.0/users/<my-email>/manager , I receive the following response (I replaced values with "HIDDEN"): { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects/$entity", "@odata.type": "#microsoft.graph.user", "id": HIDDEN, "businessPhones": [ HIDDEN ], "displayName": HIDDEN, "givenName": HIDDEN, "jobTitle": "Director, Information Technology", "mail": HIDDEN, "mobilePhone": HIDDEN, "officeLocation": HIDDEN, "preferredLanguage":

Difference between attributes id and uri within _metadata node of a OData request/response?

眉间皱痕 提交于 2020-03-01 18:26:09
问题 What is the difference between attributes id and uri within _metadata node of a OData request/response? All request/response sent by UI5 app contain those both attributes which are every time equal. Isn't this an unwanted redundancy? Is there any configuration in the gateway server which corresponds to those attributes? I would expect here only one attribute containing key which relates service part only i.e. SERVICE_ID/Entity_Name/keys I'm currently working with version 1.71 let

Loading OData without Table or List object in SAPUI5

落爺英雄遲暮 提交于 2020-02-29 05:05:11
问题 I have 2 weeks looking for an example to understand how the OData works. I have defined in the Manifest.json my url with the OData service { "_version" : "1.7.0", "sap.app" : { "id" : "test", "type" : "application", "i18n" : "i18n/i18n.properties", "applicationVersion": { "version" : "1.0.0" }, "title" : "{{appTitle}}", "description" : "{{appDescription}}", "sourceTemplate": { "id" : "servicecatalog.connectivityComponent", "version" : "0.0.0" }, "dataSources" : { "Test" : { "uri" : "/sap/opu

Loading OData without Table or List object in SAPUI5

僤鯓⒐⒋嵵緔 提交于 2020-02-29 05:03:49
问题 I have 2 weeks looking for an example to understand how the OData works. I have defined in the Manifest.json my url with the OData service { "_version" : "1.7.0", "sap.app" : { "id" : "test", "type" : "application", "i18n" : "i18n/i18n.properties", "applicationVersion": { "version" : "1.0.0" }, "title" : "{{appTitle}}", "description" : "{{appDescription}}", "sourceTemplate": { "id" : "servicecatalog.connectivityComponent", "version" : "0.0.0" }, "dataSources" : { "Test" : { "uri" : "/sap/opu

How to fix “[OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager.” error in SSIS?

这一生的挚爱 提交于 2020-02-25 04:07:26
问题 I am having problem when running SSIS which extracts data from SharePoint list. SSIS Package was running fine till 2 weeks back and suddenly the package is failing with this error: [OData Source [56]] Error: Cannot acquire a managed connection from the run-time connection manager. [SSIS.Pipeline] Error: OData Source failed validation and returned error code 0xC020801F. [SSIS.Pipeline] Error: One or more component failed validation. Error: There were errors during task validation Tried: