Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
674 views
in Technique[技术] by (71.8m points)

web services - iPhone interaction with ASP.NET WebService

I have to develop an application, which will request to a web service developed in ASP.NET.

I don't know, what is the code of creating a request to asp.net web service,

How asp.net web service will respond to iPhone Application?

How iPhone will parse that response to proper way?

I have already read this question


How to Fetch Data From a WebService in iPhone?
But given link only gives the .pdf file.

My need is sample code - that can explain me how to make connection & retrieve data from asp.net web service.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can actually make a web service and make it real easy to integrate into your iphone up. I would suggest if you are using .net to create a WCF service with webHttp bidding and implement get and post methods, you can get responses back in json and xml (theres a set of classes to parse Json on the iphone that will make parsing the response a breeze, they are avaialble in the web), with little setup you will be able to perform gets and post from the iphone using NSURLRequest. Heres an article that talks about making a restful wcf service http://www.developer.com/net/article.php/10916_3695436_2. Its also very easy to add authentication and security to your services with WCF.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...