Does one choose SOAP vs REST based on the data?

Viewed 50

I've read all the links regarding WCF SOAP and REST services, so I understand the theory behind it. Please bear with me because the question may be difficult to understand.

We have several javascript maps that read GeoJSON data from several WCF services that I created. These are REST services because they're returning JSON.

The only reason they return JSON (which make them REST) is because that's the format that the maps read. The maps do not read XML.

From my point-of-view, the only factor I took into consideration was the type of data the map consumes (JSON) and thus created the service. These services happen to be REST.

In other words, I never once asked myself Hmmm... should it be REST or SOAP?. I simply said I need to create a service that returns JSON so the maps work. And BTW, it's REST..

Is that how one selects if the architecture used is SOAP or REST?

0 Answers
Related