PDA

View Full Version : Accessing web services from an iPhone




rrpalma
Jul 23, 2010, 09:40 PM
Hello,

Total noob here to iphone programming, but not to Objective-C.

Does the iPhone SDK provide for a set of classes / APIs to access remote web services? Or do simple HTTP POSTs and GETs?

Thanks for your comments!



dejo
Jul 23, 2010, 10:23 PM
Or do simple HTTP POSTs and GETs?
Isn't that how most web services are done?

rrpalma
Jul 24, 2010, 01:04 AM
Isn't that how most web services are done?

Thanks for reading. You're right I guess. But although all web services involve a POST (or a GET) not all GETs or POSTs are for web services. So perhaps I should rephrase my question to a more specific:

Does the iphone SDK provide an API for SOAP based web services, or at the very least, for doing basic POSTs and GETs?

robbieduncan
Jul 24, 2010, 02:47 AM
Does the iphone SDK provide an API for SOAP based web services, or at the very least, for doing basic POSTs and GETs?

I don't think there i built-in support for SOAP. NSURLConnection can do POST or GET http connections.

skunkworker
Jul 24, 2010, 03:14 AM
Can't NSURLConnection pretty much do any thing that a RESTful interface would allow?

robbieduncan
Jul 24, 2010, 03:29 AM
Can't NSURLConnection pretty much do any thing that a RESTful interface would allow?

Yes, but you have to do a lot of work yourself. If Apple chose to provide a set of classes for this sort of thing you can imagine it would be a few lines of code only.