4

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.

Thanks in advance! ~KS

Karoly S
  • 3,180
  • 4
  • 35
  • 55

1 Answers1

3

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.

How to access SOAP services from iPhone.

Hope this helps anyone with a similar question! -Karoly

Community
  • 1
  • 1
Karoly S
  • 3,180
  • 4
  • 35
  • 55