views:

69

answers:

4

I have to create a web service for iPhone. So I would like to know which web response is the best for iPhone app developement(SOAP vs REST vs XML vs JSON vs ... any other).

Is there any good example to access webservice for the best web response?

+3  A: 

This question is practically impossible to answer because web services have different strengths and weaknesses. There is no one "best" web service for the iPhone.

A better question, perhaps, would be answered by what the best services are for your given application. So, in that light, what are you trying to serve to your phone?

Alex Reynolds
ok then which is the most popular for iphone?
suchita
A: 

This may be more of a hint along the way than an actual answer, but there is a good Cocoa XML-RPC framework available under MIT license.

Isaac
A: 

The easiest to handle is probably a REST API using XML for data encapsulation. Cocoa has built-in tools for handling both HTTP and and XML (NSURLRequest and NSXMLParser, respectively).

Williham Totland
+1  A: 

A REST API using JSON is very lightweight and easy to implement at both the server and client end. JSON is very popular with iPhone developers, and is much lighter weight than XML.

There's a great Cocoa framework for working with JSON:

http://code.google.com/p/json-framework/downloads/list

Rob Keniger