SOAP has high-level functions that JSON doesn't (over and above the simple protocol level differences). Not really necessary for simple database queries and the like, but useful for more sophisticated stuff. (Disclaimer -- I've never actually used SOAP -- it's always been too complex for my uses.)
Certainly when faced with the simple choice between JSON and XML, JSON is the right choice 9 times out of 10. On May 30, 8:02 am, harism <[email protected]> wrote: > Hi Dan, > > I was introduced to JSON only very recently and since you seem to > understand the difference between JSON and SOAP much better than I do, > I'm wondering is there really need for both? I mean JSON was very > flexible and easy to use. Only thing I can come up with is the lack of > binary data transferring, otherwise I preferred JSON for database > queries. > > -- > H > > On Mon, May 30, 2011 at 3:46 PM, DanH <[email protected]> wrote: > > Some web services may give you the choice between "SOAP" and "JSON" > > remote APIs. In such a case, whereas SOAP defines much of the > > structure of requests and responses, and the conceptual protocols > > involved, JSON (by itself) does not (it only defines the basic data > > format), so additional info is required from the designers of the > > service, and, likely, additional code will have to be written on your > > side to handle these things. > > > When given a choice on an existing service, the choice would depend on > > how complex your queries are, and, to an extent, on how well-designed > > the ad-hoc JSON protocols are. For simple queries on a well-designed > > site you'd likely end up writing less code with JSON, but for more > > complex operations, or if the JSON protocols are not well-defined, it > > might be better to use SOAP, if the added overhead doesn't slow things > > down too much. > > > On May 29, 10:15 pm, Migazan <[email protected]> wrote: > >> What better way to consume web services on android JSON or SOAP? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

