针对iPhone / iPad的SOAP和XML响应解析示例? [英] SOAP and XML Response Parsing Samples for iPhone/iPad?

查看:108
本文介绍了针对iPhone / iPad的SOAP和XML响应解析示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在搜索了一段时间后,我无法在iPhone / iPad应用程序中找到有关使用SOAP接口的任何有用示例/教程。如果有人知道有关SOAP和/或XML解析响应的任何好的话我会非常感激。

After searching around for a while, I have been unable to find any helpful samples/tutorials on using a SOAP interface in an iPhone/iPad app. If someone knows of any good ones regarding SOAP and/or XML parsing of the response I would greatly appreciate it.

提前致谢!
~KS

Thanks in advance! ~KS

推荐答案

好吧,我已经设法得到一些能够发布和接收/从xcode 4.0开始查看我的iPhone应用程序中SOAP服务的响应。

Alright, well I've managed to get something working that is able to post and receive/view a response from a SOAP service in my iPhone app as of xcode 4.0.

http://abhicodehelp.blogspot.com/2010/12/handling-soap-with-iphone.html

我使用了上面链接中的一些代码,结合我自己的一些探索,关于如何使用我在下面添加的用户名和密码进行实际身份验证。

I used bits of code from the above link in combination with some of my own exploration with regards on how to actually authenticate with a username and password which I've added below.

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
    NSURLCredential *myCreds = [[NSURLCredential alloc] initWithUser:@"**USERNAME**" password:@"**PASSWORD**" persistence:NO];

    [challenge.sender useCredential:myCreds forAuthenticationChallenge:challenge];
    [myCreds release];
}

虽然陈旧,但下面的链接似乎是一个更受欢迎的问题所以我确定有一些我没有最终使用的资源。

While old, the link below seemed to be a much more popular question when asked so im sure there are some more resources available that I didn't end up using.

如何访问来自iPhone的SOAP服务

希望这可以帮助任何有类似问题的人!
-Karoly

Hope this helps anyone with a similar question! -Karoly

这篇关于针对iPhone / iPad的SOAP和XML响应解析示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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