odata

how to pass the result model object out of System.Web.Http.ModelBinding.IModelBinder. BindModel?

你。 提交于 2019-12-11 02:17:42
问题 This is a follow up question to the answer https://stackoverflow.com/a/10099536/3481183 Now that I could successfully extracted the content, apply deserialization and obtain the object that I want. How do I pass it to the action? The provided function BindModel must return a bool value, which is very confusing to me. My code: public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext) { actionContext.Request.Content.ReadAsStringAsync().ContinueWith(deserialize);

Why is $expand not working correct in my JPA/Olingo project

让人想犯罪 __ 提交于 2019-12-11 01:53:57
问题 I am currently working on a JPA/Olingo based odata service. The Olingo version used is 2.0.7. The JPA implementation used is eclipselink version 2.5.1. There are two entities connected through a OneToMany relationship (Company, Page). Requesting the company from the service (e.g. /odata/v2/Companies) without an $expand works fine. The same for requesting the pages. Requesting pages and expanding the CompanyDetails works fine as well. Somehow requesting the company and expanding the associated

OData REST Filter for deeply nested data

折月煮酒 提交于 2019-12-11 00:36:13
问题 I have a working REST request that returns a large results collection. (trimmed here) The original URL is: http://intranet.domain.com//_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='domain\kens'&$select=AccountName,DisplayName,Email,Title,UserProfileProperties The response is: { "d": { "__metadata": { "id": "stuff", "uri": "morestuff", "type": "SP.UserProfiles.PersonProperties" }, "AccountName": "domain\\KenS", "DisplayName": "Ken Sanchez", "Email": "KenS@domain.com",

Failed to load resource while consuming OData service

风流意气都作罢 提交于 2019-12-11 00:07:30
问题 Hello comunnity i need some help, i have my odata service already running and i have an url like this: https://myclient:port/sap/opu/odata/SAP/servicename_SRV/MaterialListSet This is my config, which I suppose is wrong. manifest.json "dataSources": { "invoiceRemote": { "uri": "https://myclient:port/sap/opu/odata/SAP/servicename_SRV/", "type": "OData", "settings": { "odataVersion": "2.0" } } } . . . "models": { ... "invoice": { "dataSource": "invoiceRemote" } } I get these two errors: Failed

Web Api $extend IQueryable with filter

佐手、 提交于 2019-12-10 22:42:51
问题 I have a setup where I've get a WebApi OData service which returns: Customers. The code for returning the customers is: public IHttpActionResult GetCustomers(ODataQueryOptions<Customer> queryOptions) { return Ok(context.Customers.Where(i => i.IsActive).AsQueryable()); } So the GetCustomers method returns an IQuerable result of all active customers. For history purposes we leave all customers in the database, but when a customer is removed, we set the IsActive field to false. The OData setup

Is it possible to expose data from Oracle using OData?

北城以北 提交于 2019-12-10 21:07:56
问题 From my personal research, it appears that OData implementations depend extensively on MS Entity framework. It would seem possible to implement the OData producer protocol using an open ORM like NHibernate in C# or Hibernate in Java. In the best of all worlds, it would be cool to expose data using OData protocol from Oracle. I am open to other open solutions like Java, JRuby, etc. Thanks in advance for your time. 回答1: Actually Entity Framework is just one of the providers (although the

SharePoint 2013 REST API odata $filter ignores unicode characters such as German umlauts äöü

萝らか妹 提交于 2019-12-10 20:59:33
问题 I'm trying to use SharePoint 2013 REST API (odata) with unicode characters such as umlauts (ä ö ü). ...?$select=Title%2CID&$filter=substringof%28%27hello%20w%F6rld%27%2C%20Title%29&$orderby=ID%20desc&$top=14 ^^ should search for "hello w* ö *rld" using substringof('...', Field) I'm escaping the URL correctly (and also single quotes with double quotes) and filtering works for all kinds of characters (even backslash and quotes), however, entering ä/ö/ü or any other unicode character has no

oData - applying filters to SQL queries

匆匆过客 提交于 2019-12-10 20:19:30
问题 I am relatively new to oData service and I am trying to explore if oData is feasible for my project. From all the examples / demos that I have come across,every demo always loads up all data into the repository and then oData filters are applied over the data. Is there a way to not load up all data (apply the filters to SQL from oData) from SQL which will obviously be highly inefficient for N number of requests coming in /second ? So for example if I had a movies service : localhost:4502

OData4j for Android: ClassNotFoundException for XmlInputFactory

北战南征 提交于 2019-12-10 19:45:36
问题 This is the first time I'm attempting to learn Java so I thought i'd port my Windows Phone application over to Android to begin learning. I'm trying to use the OData4j 0.7 jar library to call my existing WCF Data Service (which works in my WP app / browser), but I'm getting the following error: Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.stream.XMLInputFactory" on path: DexPathList[[zip file "/data/app/myfirstapp.blazemonkey.com.myfirstapp-1.apk"]

OData / WCF Data Service not working with complex type

て烟熏妆下的殇ゞ 提交于 2019-12-10 19:04:42
问题 I'm brand new to OData and WCF data services so this might be an easy problem. I'm using VS Web Developer Express 2010 where I have a very simple WCF Data Service hosted in a console app. It's returning an IQuerable collection of a simple 'Study' class from a repository (located in a separated dll project), which in turn retrieves 'Study' classes from a db project in another dll (so 3 projects in the solution). I also have an 'Experiment' class in the db project and there can be multiple