Does anyone have a simple data entry example which involves WCF (Odata ) and WP7?
Thanks
Here are two good places to start:
Introduction to WCF Data service and
ODATA
OData and WCF Data
Services
Once you have the service itself running, you would access it in the WP7 application the same way you access any other WCF service.
Note that there is a OData Client Library for Windows Phone 7. You might also want to read this article for some additional info.
Related
I am exploring the online template in Visual Studio 2010: WCF REST Service Template 40
Does anyone know of a great sample to learn from? Or at least point me the right direction...
I am trying to create a service of looking up a EmployeeID from a database to return some serialized employee profile data.
Basically, I wish to know what goes where (via the newer way, WCF 4.0, RESTful, Json).
-ConnectionString
-QueryString
-etc
Hoping the Url will look something like this:
http://localhost:55123/EmployeeService/EmployeeLookup/{EmployeeID}
My next task of course would be to consume the service in some webpage.
I just went through this 10 part sample this weekend (it's supposed to be 12, but they never posted the last 2). It uses a database to retrieve task and user info, and might give you a feel for what you're trying to do.
I found it very useful and informative, and I've been doing SOAP WCF (3.5) for the last year+.
Introducing WCF WebHttp Services in .NET 4
The 10 parts posted so far are:
1. Getting Started with WCF WebHttp Services in .NET 4
2. Clients and the Automatic Help Page in WCF WebHttp Services
3. Updating State in WCF WebHttp Services
4. Automatic and Explicit Format Selection in WCF WebHttp Services
5. Error Handling in WCF WebHttp Services with WebFaultException
6. Using Routes to Compose WCF WebHttp Services
7. Integrating ASP.NET Output Caching with WCF WebHttp Services
8. Returning Custom Formats from WCF WebHttp Services
9. Creating Views in WCF WebHttp Services with T4
10. Conditional GET and ETag Support in WCF WebHttp Services
The first 4 will probably be of the most interest to you based on the question, but all 10 are valuable and informative.
I am starting a new webservice project which will be consumed by multiple consumer applications done in different technology like ASP, ASP.Net and PHP. I am planning to develop this service as a WCF service. I am new to WCF and I understand WCF is like umbrella tech which has all the features for developing a distributed SOA applications.
I would like to get your advice on whether my choice of opting WCF service over classic asmx service is correct. The consumer applications are existing application done different technologies as I said before. This service is a simple service that creates and updates user information in a centralized DB.
If my decision of choosing WCF is correct, then please let me know if there are any specific things I need to consider so that the existing application can consume my WCF service without any hiccups. In other words, I can provide a asmx service for this which they can consume directly without any issues (and currently they are consuming some of our asmx service. Since the current requirement is new I want it to be done with WCF). Likewise, the consumer should be able to consume my service like they consume asmx service.
I am asking this question because WCF provides additional features like security, etc. and hence the consumers should also follow the practice to communicate with the service.
Any advice is highly appreciated.
You probably want to use BasicHttpBinding in your WCF service and, although I'm not a PHP developer, I understand that PHP 5 has a SOAP library that can be used to create a service proxy based on the WSDL document exposed by the WCF service, assuming metadata exchange is enabled.
I have an application service layer (which all return serializable viewmodels). Some of these app services need to be callable via AJAX by client code in the Web UI. I'm currently wrapping them in ASMX files that do nothing but dictate the response format as JSON delegate each call to the application service class with the same signature.
Is it advisable to try to save a few lines of code by exposing the appropriate application service classes as WCF services? Can someone point me to an example? Any potential pitfalls for usage in WebForms client code?
Microsoft now considers ASMX services to be "legacy technology". You should not use them for any new development. They have been completely replaced by WCF. For instance, see the top of this article: http://msdn.microsoft.com/en-us/library/bb885203.aspx:
This topic is specific to a legacy
technology. XML Web services and XML
Web service clients should now be
created using Windows Communication
Foundation .
Probably missing something very basic. I created a WCF 4.0 Rest Service. It works no problems when I'm hitting the url from a browser and I'm getting back what I want.
But now I want to use that service from a client mvc application (it will also be used by other non .net platforms which is why it's a rest service in the first place).
Problem is how do I get a service reference to it so I can start to use it in my c# code? With the new minimal WCF .net 4 config approach and no interface for the service contract, I don't know how to specify a mex endpoint. Ultimately I don't want a mex endpoint in production, just during development. I would love to be able to specify that all my services (around 10 in one application) have endpoints with one tiny piece of config that vs2010 .config transformations just rips out when I publish.
Stop. REST service doesn't use metadata. Metadata (Mex endpoint) are only for SOAP services because WSDL 1.1 (the only version supported by WCF) is able to describe only SOAP service. WADL or WSDL 2.0 is able to describe REST service but non of them is currently supported by WCF.
REST service is consumed by using WebRequest directly or by building ChannelFactory on top of shared contracts. Both methods are described here. Other method is to use HttpClient from REST Starter kit (former API). The problem with Starter kit is that it has never reached RTM (it was replaced by WCF 4). Instead of metadata endpoint WCF 4 REST service offers help page where all operation are described. When using WCF 4 REST template the help page should be already turned on - just add /help sufix to address of your service. Here is another article about building REST clients.
Does anyone know how to host a WCF Data Service (or OData) inside IIS7? I'm seeing lots of articles about hosting WCF, but none specific to WCF Data Service.
Thank you very much.
Hosting a WCF Data Service in IIS is actually the default option.
Its a pretty easy 3 step process:
Create a new WebApplication project (or re-use an existing one)
Add a WCF Data Service to the project
Deploy to your IIS server
Step 3 is just the standard process for deploying a WebApplication to IIS.
A WCF Data Service is just a WCF (REST) service, with some additional out-of-the-box functionality added in.
It has a *.svc file and all - it will be hosted very much the same as a "regular" WCF REST service.
So all the articles you see about WCF REST should really apply to WCF Data Services as well - or are you experiencing some difficulties with something specifically??