I've read quite a few articles regarding the differences between REST and SOAP. I will just summarize in a few lines, please let me know if its wrong.
SOAP is a protocol which uses HTTP, TCP etc to transfer the messages but REST uses only HTTP to transfer messages.
SOAP transfers the messages in XML format only but REST uses JSON or XML.
REST doesn't involve the same traffic overhead as SOAP (as SOAP involves the complex XML WSDL generation).
I've read that WCF was developed to provide interoperability. I have developed REST services in .net and the client was a mobile device (not a .net client). This one I have tested and gone live as well.
Having said that, my question is ...
Has anyone developed basichttpbinding WCF service and provided this to a non .net client like Java, mobile devices etc to make it interoperable? Is it possible for non .net clients to consume WCF other than REST?
Yes, you can consume a WCF service with any kind of SOAP or REST client.
SOAP is a protocol which uses HTTP, TCP etc to transfer the messages but REST uses only HTTP to transfer messages.
This is too broad to answer with either Yes or No. Strictly related to your question, we have this characteristics for SOAP:
Now the characteristics for REST:
SOAP transfers the messages in XML format only but REST uses JSON or XML.
SOAP can only send XML messages, it's part of the protocol. You actually need to use a specific format for the XML with Envelope, Header and Body tags.
REST is about representations of resources. The representation can have any structure and can be in any format, not just XML or JSON (although XML and JSON are the most used);
REST doesn't involve the same traffic overhead as SOAP (as SOAP involves the complex XML WSDL generation).
WSDL is not involved in the actual call of operations, it's something separate to describe the SOAP web service. REST has something similar (although not very used) called WADL. You need to marshall/unmarshall your data with both SOAP and REST so the overhead is most of the time not an issue (the SOAP envelope is not that big).
Has anyone developed basichttpbinding WCF service and provided this to a non .net client like Java, mobile devices etc to make it interoperable? Is it possible for non .net clients to consume WCF other than REST?
That's the idea with web services (SOAP or RESTful), to be called from any kind of clients. It's a method of communications between two machines. The implementation of the machines does not matter (Java, C#, PHP, Python etc).
WCF is a web service framework that can expose the service as both SOAP or REST API. It can be called from any kind of client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With