Transfer Data between iOS and Web Server

iOS device sends to and receives data from Microsoft IIS web server. Here I would use JSON protocol for communication between iOS device and IIS server.
We create a project called "InStoreDump" in Microsoft Visual and create a new Web Service called WsInStoreDump.asmx.

On the other side, we need to develop for iOS device. First, we create a class and name it as "JSONHelper". Here is a header file JSONHelper.h.

And another file JSONHelper.m.

We pay attention on that IIS Web Service with .Net 3.5 and later generates extra string {"d":null} of JSON. But iOS won't reconize it. Then we filter and remove this string.


For example, there is a function which iPhone sends a store information request to IIS web service. Add a web service function called "GetStoreByLocation".

Here is how to call the above IIS web service function in iOS.



Facebook © 2017 Elaw Dream - Chiling Law. All rights reserved.

Visitors: voicexml