iPhone / .NET WCF Interoperability

前端 未结 3 883
悲&欢浪女
悲&欢浪女 2021-01-30 15:02

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

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 15:59

    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.

提交回复
热议问题