wcf-data-services

Using IEdmModel to resolve EntitySet name into EntityName (Products -> Product)

血红的双手。 提交于 2019-12-12 02:33:59
问题 I am using a OData Service on top of Entity Framework var uri = new Uri("http://localhost:9876/Service.svc"); var context = new DataServiceContext(uri, , DataServiceProtocolVersion.V3); var model = EdmxReader.Parse( XmlReader.Create(context.GetMetadataUri().AbsoluteUri) ); context.Format.UseJson(model); Now I need to figure out the entity name name from an EntitySet name My entities are called Product or Customer but the Name of the EntitySet can be either Products or CustomerSet or something

Windows Phone 7 DataServicesClient Request Headers Accept gzip

依然范特西╮ 提交于 2019-12-12 01:57:22
问题 I have a Windows Phone 7 application that is utilizing the DataServicesClient to access a WCF DataService (ODATA) and I want to ask the service to compress the response. I know if the Request Headers includes "Accept-Encoding" header with the value of "gzip" the WCF DS will compress the response. Is there a way to add this header to the Request when using the DataServicesClient on WP7? The Request Headers collection appears to be readonly. What I would like to be able to do is the following

OData v4.0 via ASP.NET WebAPI - Can Excel consume a service?

二次信任 提交于 2019-12-12 01:49:45
问题 I have built a few WebAPIs since it was born, including one supporting OData URL filters when that was new. I see now that OData over WebAPI has matured, I see it can serve service metadata. Is it complete enough for Excel or other OData client tooling to plug and play as if it were a full WCF Data Service (ye olde Astoria)? That's it. Thanks 回答1: It is. In the past you had to do the right configuration or do a workaround to populate the OData feed from Web API correctly, to be able to

Unable to parse odata json responses containing root property “d” using wcf client services 5.3 generator

假装没事ソ 提交于 2019-12-12 01:11:58
问题 I am starting this new thread as a continuation of comments in: Consume Odata Service and get result in JSON The issue that I am facing is that I have upgraded to wcf data services 5.5 and wcf client tools 5.3 as recommended in the thread. And I am trying to perform a simple post to the following JayStorm service: https://open.jaystack.net/c72e6c4b-27ba-49bb-9321-e167ed03d00b/6494690e-1d5f-418d-adca-0ac515b7b742/api/mydatabase/ I generated the client service reference in .Net and am running

Can't discover the service following Walkthrough: Binding WPF Controls to a WCF Data Service

僤鯓⒐⒋嵵緔 提交于 2019-12-11 19:03:40
问题 I'm following the Walkthrough: Binding WPF Controls to a WCF Data Service But when I try to Discover the service I get an error saying that there was an error downloading metadata from the address What could it be? EDIT : It basically creates an ASP NET Web App, adds an ADO Nen Entity Model, Adds a WCF Data Service, adds a WPF App to the solution, and tries to add a new data source from the service, the Add Service Reference appears, and it's there where the error appears. 回答1: Simply added

Why am i having problems with EF5 with WCF Service Application?

江枫思渺然 提交于 2019-12-11 18:28:57
问题 I have created EF Data Services before but I'm receiving this message everytime I try and create a EF5 - WCF Service Application. The operation 'ProcessRequestForMessage' could not be loaded because it has a parameter or return type of type System.ServiceModel.Channels.Message or a type that has MessageContractAttribute and other parameters of different types. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method must not use any other types of

How to pass a NULL value to a WCF Data Services' service operation?

烂漫一生 提交于 2019-12-11 18:19:41
问题 I have a WCF data services' service operation such as [WebGet(UriTemplate = "GetData")] public IQueryable<string> GetData(int code, int deviceid, int groupId, DateTime dateTimeFrom, DateTime dateTimeTo) { ... } I am calling this service operation by sending a HTTP request to the server in this format: http://localhost:6000/GetData?code=0&deviceId=1&groupId=0L&dateTimeFrom=datetime'2013-01-31T15:36:50.904'&dateTimeTo=datetime'2012-02-01T15:36:50.904' and it is working like a charm. Now I want

WCF Data Services - Custom POST method

て烟熏妆下的殇ゞ 提交于 2019-12-11 14:58:27
问题 I have created a WCF Data Service and it works fine. My Custom methods that are GET type methods work ok as well. The problem is in POST custom method. The method looks like that: [WebInvoke(Method = "POST")] public string CustomMethod(string myParameter) { return "yes" + myParameter; } I also invoke: config.SetServiceOperationAccessRule("CustomMethod", ServiceOperationRights.All); Then in fiddler my request looks like that: Method: POST URL: http://localhost:1219/DataService.svc/CustomMethod

404 Not Found error while calling WCF service from Jquery ajax

早过忘川 提交于 2019-12-11 14:36:20
问题 I am trying to access wcf service hosted on IIS from html page using jquery ajax call,I am not able to hit the service , Its throwing 404 not found error, Can i please know should i make changes in the jquery ajax call or web config file to access the service hosted in IIS or some other remote machine HTML Page: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script src="json.js"></script> <title></title>

objective c calling wcf rest service request

亡梦爱人 提交于 2019-12-11 14:11:10
问题 I've been trying to look for online articles / tutorials on how to go about coding a request from a wcf service. I have the following web service uploaded to my server: [ServiceContract] public interface IUserAccountService { [OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "UserLogIn?id={email}&password={password}")] AuthenticationToken UserLogIn(string email, string password); } I'm getting really confused with the articles or SO questions