Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone / .NET WCF Interoperability

Tags:

.net

iphone

wcf

I'm architecting a .NET "web service" and an iPhone application that will consume these services. I'm curious if there are any best practices for architecting the protocol for exchanging data between the two. SOAP-based web services feel too heavy to me for an iPhone app. Perhaps REST, JSON, POX instead? Certainly the specifics of the application dictate the protocol to some degree, but I'm curious what others have done.

Ideally, I'd like to leverage WCF if possible (again, perhaps its REST, JSON, or POX support) so that I can keep my options open for creating other bindings for other client applications in the future.

Any advice would be greatly appreciated.

Thanks.

like image 789
goombaloon Avatar asked May 21 '09 02:05

goombaloon


3 Answers

We're currently using a WCF based REST/POX service for one of our applications. I would recommend sticking with REST/POX as there are no class generators for web services (that i know of) on the iPhone like you get in the .NET world by adding a service reference. This will make the parsing a lot simpler as you wont have to worry about all the extra junk soap adds to the messages.

Basically take a look at NSUrlConnection and NSXmlParser and read up on "Key Value Coding" (makes the xml parsing a LOT easier) and you'll have everything you need to get it done with a minimal amount of code.

like image 75
Lounges Avatar answered Sep 20 '22 03:09

Lounges


I know RemObjects SDK for OS X

I hope it can be helpful for you.

like image 45
Hugues Van Landeghem Avatar answered Sep 22 '22 03:09

Hugues Van Landeghem


Check out this blog post for a quick overview on how to create a WCF service for your iphone app.

like image 22
jaminto Avatar answered Sep 22 '22 03:09

jaminto