Does the WCF Data Services Toolkit support CORS out of the box? - jsonp

I'm trying to find a decent solution for cross-domain connections between WCF Data Services and datajs. JSONP works great for GET requests, but I can't POST anything. Does the WCF Data Services Toolkit support CORS out of the box? Are there any resources out there that show how to implement CORS for WCF Data Services?

WCF DS does not support CORS out of the box. I haven't been able to find any other out of the box solutions. It may be possible to add CORS support to a server by creating a message inspector for WCF.

Related

Web API vs Window Communication Foundation

I read bunch of articles about SOAP and REST(WCF and Web API).
And after all the reading I end up with understanding that WCF is more powerful, but lots of it's functionality can be implemented in Web API. For example for duplex communication in web API we can use SignalR or sockets. WCF gives you more security with WS-Security, but in Web API you can use HTTPs
So what can WCF give you that Web API cant, except working with lots of different protocols and data formats?
WCF supports more protocols and transports than Web Api, some of then very useful, like SOAP, FTP and MSMQ.
Here you have a table comparing both: https://msdn.microsoft.com/en-us/library/jj823172.aspx
Both has their own purposes, and the table above can help you to choose.
Both of them are using for different scenario WebApi uses full features of Restful services like Uri caching and various other features .Check the below difference I hope it will help you

Requesting data from WCF Webservice with Qooxdoo

I have a qooxdoo web application which should be able to request data from a WCF web service. The WCF service uses SOAP. I'm currently looking for a way to set up the communication between my qooxdoo application and the WCF web service.
Is there a way to get this done? I saw that qooxdoo is supporting REST and I'm looking for something like a SOAP module in qooxdoo.
Thanks in advance!
There's an ancient contrib, probably unmaintained, at http://svn.code.sf.net/p/qooxdoo-contrib/code/trunk/qooxdoo-contrib/Soap/0.5.1/. You might not be able to use it right away, but I think the source code there will need just a few changes to become usable.

ASP.net web api

I've been reading up about MVC 4 and was interested in the web API feature.
In what scenarios would it be advantageous to use web api over a WCF Http service?
Web API provides far more access to all aspects of the HTTP interaction. It was designed from the ground up around the HTTP spec. WCF is fine if you are just using HTTP to get through the firewall. If you really want to use HTTP as an application protocol, you will find Web API much easier.

Adding an HTTP RPC Service using webHttpBinding for an Existing SOAP Service implemented with WCF?

I've been told that adding an HTTP RPC web service given an existing SOAP web service implemented with WCF is as simple as adding a webHttpBinding and a couple of attributes.
I'd be grateful if someone could show how to implement such an HTTP RPC web service using webHttpBinding given an existing SOAP web service that is based on WCF. It would be super helpful if the answer could show all the code for both services and even more helpful if the example is self-contained so that someone could install for testing without having to know anything about either. FYI, while I have programmed on the .NET stack it's been ~5 years and today all my work is on LAMP so I'm just not familiar enough with the latest generation .NET stack or it's current runtime environments.
My specific use-case is a set of two (2) services where one responds with an AuthToken and then a second service where I pass the AuthToken and Username, Password and another bit of information and the response back is a user object with attributes like 'first_name', 'last_name', etc. Ideally I'd be able to access those same services via two different URLs and the responses I would get back would be in JSON format.
Note I'm looking for an example to be installed by someone else who programs on the .NET stack but isn't highly motivated to do won't much extra work. I'm trying to get an HTTP-based web service I can use without having to add a SOAP client to the existing PHP framework I am using and I think if I could get a concise example of how to add such an HTTP RPC web service the .NET programmer might be happily willing to add the HTTP RPC web service for my needs. FYI, the web service in question was developed specifically for this use case and is not part of a standard set of SOAP services documented for and in use by lots of other developers.

wcf and web service compatiblity

I have a web service that is used by many different clients using many different languages.
I want to switch it to wcf to take advantage of the many different endpoints.
However what has been stopping me is that I am afraid that the clients will have to use a special sdk to connect (if they are using java or php or some other language) that is different then the sdk they use to connect to the existing web service.
Is this true? Or is connecting to WCF the exact same as it is for web services in other languages.
The project I am currently working on has multiple WCF configurations, some are using the default SOAP implementation, and some are using a POX (plain-old-xml) style message.
So the short answer is 'yes' you can configure WCF in such a way to work with just about anything.
However, be warned that as soon as you step outside the default little box that WCF has set up for you, it gets pretty complicated. You end up with a lot of custom message parsing and security handling if you go to a POX message format. Its easier if you stick with SOAP though.
As for needing a 'special SDK' you won't. You can communicate with WCF with simple HTTP POST messages if needed.
I have clients that are using VB.NET apps (using SOAP) and Java apps (using POX) to hit my WCF services.
A basicHttpBinding endpoint in WCF is exactly a standard SOAP endpoint, and your Java or PHP clients will not have to change in any way.