iPhone 与 ASP.NET WebService 的交互 [英] iPhone interaction with ASP.NET WebService

查看:28
本文介绍了iPhone 与 ASP.NET WebService 的交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须开发一个应用程序,该应用程序将请求在 ASP.NET 中开发的 Web 服务.

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

我不知道,创建对asp.net web服务的请求的代码是什么,

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

asp.net 网络服务将如何响应 iPhone 应用程序?

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

iPhone 将如何以正确的方式解析该响应?

How iPhone will parse that response to proper way?

我已经阅读了这个问题<小时>如何从 iPhone 中的 WebService 获取数据?<小时>但给定的链接只给出了 .pdf 文件.

I have already read this question


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

我需要的是示例代码 - 可以解释我如何建立连接和;从 asp.net 网络服务中检索数据.

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

推荐答案

您实际上可以制作 Web 服务,并使其真正轻松地集成到您的 iphone 中.我建议如果你使用 .net 来创建一个带有 webHttp 竞价的 WCF 服务并实现 get 和 post 方法,你可以在 json 和 xml 中得到响应(有一组类来解析 iphone 上的 Json,可以解析响应轻而易举,它们在网络中可用),只需很少的设置,您就可以使用 NSURLRequest 从 iphone 执行获取和发布.这里有一篇文章,讨论如何制作一个宁静的 wcf 服务 http://www.developer.com/net/article.php/10916_3695436_2.使用 WCF 为您的服务添加身份验证和安全性也非常容易.

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.

这篇关于iPhone 与 ASP.NET WebService 的交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆