更新时间:2022-05-30 05:33:45
好吧,我已经设法使一些工作能够在我的 iPhone 应用程序中发布和接收/查看来自 xcode 的 SOAP 服务的响应4.0.
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.
希望这对有类似问题的人有所帮助!-卡罗利
Hope this helps anyone with a similar question! -Karoly