odata

data at the root level is invalid. line 1 for SSIS

◇◆丶佛笑我妖孽 提交于 2020-01-03 19:22:14
问题 I need to use VS2015 with SQL Server 2012 in my SSIS project. When I changed Deployment Target Server Version from SQL Server 2016 to SQL Server 2012 I get following error. OData V4. Stack Trace: Data at the root level is invalid. Line 1, position 1. (System.Xml) Program Location: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl

Kendo DataSource: How to set filters before fetch without sending two httprequests

本秂侑毒 提交于 2020-01-03 07:23:21
问题 Environment: kendo version: 2013.1.319 dataSource: productsDataSource = new kendo.data.DataSource({ type: "odata", transport: { read: "http://www.mydomain.com/odata.svc/products", dataType: "json", contentType: "application/json" } schema: { type: "json", data: function(data){ return data.value; }, total: function(data){ return data['odata.count']; }, model: product }, pageSize: 50, serverPaging: true, serverFiltering: true, serverSorting: true }); Get data: productsDataSource.filter([{ field

WebAPI OData Actions Sample - Differentianting between CheckOut and CheckOutMany actions

心已入冬 提交于 2020-01-03 02:08:42
问题 I've been busy doing my own customisations to a T4 template so that I can have strongly typed OData action invocation from a .NET client. It will probably be my first open source thing that I create :) Anyway, I've testing and developing against the WebAPI OData sample for OData actions called "ODataActionsSample". For those who want to play along at home you can find the samples at http://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/ODataActionsSample/. The sample has several more

OData:Wildcard (startswith) filtering for number (ID) fields in the url request

回眸只為那壹抹淺笑 提交于 2020-01-02 22:32:21
问题 I've been researching a way to perform fuzzy searches for my numerical ID fields of my entity via OData and JavaScript. So far, I have not found the answer I am looking for. I can filter other edm.string columns perfectly using the "Startswith" filter option, however when i attempt to pass in any other non-string type, I get a type error response from the server back. In applications that I control the database, I was successfully able to get around this, by creating views I need and

How could I Encrypt OData Request Payload at Client Side(DataServiceContext) and Decrypting Request at ServerSide?

别等时光非礼了梦想. 提交于 2020-01-02 19:26:22
问题 I have an Windows Application consuming OData v4 WebAPI using DataServiceContext . WebApi is over SSL but still I think anyone can trap request using Web Debugging Tools like fiddler (on the Windows Application Host Machine) and can re-issue the request by altering Request Body. So I was just thinking what if I could encrypt RequestBody of outgoing Request in Windows Application using Public/Private Key in Production Environment. If yes how could I? Do I need to create custom

MapODataRoute and ODataQueryOptions

雨燕双飞 提交于 2020-01-02 15:38:57
问题 Im building a WebAPI OData solution that handles untyped entity objects, as described in this excellent post. Like that post, I define my EdmModel upfront, and use the MapODataRoute method and pass in the model to use: config.Routes.MapODataRoute("odata", "odata", ModelBuilder.GetEdmModel()); However, this does not seem to work with ODataQueryOptions parameter in my methods: Get(ODataQueryOptions query) { } It gives the following error: The given model does not contain the type 'System.Web

MapODataRoute and ODataQueryOptions

蓝咒 提交于 2020-01-02 15:38:50
问题 Im building a WebAPI OData solution that handles untyped entity objects, as described in this excellent post. Like that post, I define my EdmModel upfront, and use the MapODataRoute method and pass in the model to use: config.Routes.MapODataRoute("odata", "odata", ModelBuilder.GetEdmModel()); However, this does not seem to work with ODataQueryOptions parameter in my methods: Get(ODataQueryOptions query) { } It gives the following error: The given model does not contain the type 'System.Web

In OData, is there a way to order by the first element in an array?

假装没事ソ 提交于 2020-01-02 05:44:08
问题 I have an OData 4 endpoint I call for displaying data in a table. One of the columns has a set of data concatenated from a string array within my element. Is there a way to order by the first element in the array? My element could look like this: [ { "FirstName": "John", "MiddleNames": [ "Harry", "Bobby", "Sue" ], "LastName": "Jones" }, ... more elements ] and I would like to order by MiddleNames[0]. Thanks for the help! The documentation on $orderby is sparse at best... 回答1: This is NOT

OData v4 Function always returns 404

心不动则不痛 提交于 2020-01-02 03:37:10
问题 Trying to move from OData v3 to OData v4 . Why do I keep getting a 404 when trying to use OData Functions ? Web API Config: ODataModelBuilder builder = new ODataConventionModelBuilder(); //etc builder.EntitySet<LocalizableString>("LocalizableStringApi"); //etc var getComparitiveTableFunction = builder.EntityType<LocalizableString>().Collection.Function("GetComparitiveTable"); getComparitiveTableFunction.Parameter<string>("cultureCode"); getComparitiveTableFunction.ReturnsCollection

Java HTTP call to Sharepoint 2010 oData fails

左心房为你撑大大i 提交于 2020-01-01 19:57:29
问题 I am calling a Sharepoint 2010 oData service from Java which is resulting in a 400 error. I can connect to a Sharepoint 2010 list in XML format via the same code (using NTLM) successfully. I see a related post HttpClient using both SSL encryption and NTLM authentication fails which talks of the same service (listdata.svc) and the 400 error. Does anyone know what exact setting was used to resolve the error in the post above? Does anyone know if they are referring to the .NET Authorization