views:

42

answers:

2

Hi all,

Firstly i'm not a programmer but I am managing to work my way through developing my own iphone app for my photography business. I store all of my photographs with a 3rd party who make their API available for public use. I want to implement this API into my app.

I've spoken with the 3rd party and they have written all of the code on a windows based system and although they say its not tied to a windows platform i'm struggling to see or recognise any Objective-C commands within the API and so don't know where to start. They've also told me that its a SOAP based web service.

I'm wondering if anyone can tell me if I should be using the NSURLConnection method? My main desire would be to generate a UITable view of the photo categories I hold with the 3rd party as is the case with their own iphone app, which i should probably say is for members only so wouldn't suit my needs here.

I would really appreciate some assistance with this as i'd hate to have to result to paying a developer to build the app after falling at the last hurdle.

Many thanks Steve

A: 

At a very basic level, SOAP APIs are just a standard HTTP requests against specific webserver that return XML responses. That third party may have a Windows-specific client-side library to speed up the development for some clients, but since you are developing iPhone app, you can't use that library.

You have two options: - use NSURLConnection and NSXMLParser and directly talk to their webservers and parse the response yourself;
- look for an iPhone SOAP library you can reuse. Since SOAP is an industry standard, there's nothing that prevents anyone from building iPhone-specific libraries. However, I personally am not aware of particular ones.

Hope that helps. It's not the best answer, but at least it might give you an idea what to look for around.

Update: Quick search for "iPhone SOAP library" revealed the wsdl2objc project, though that one is rather old (not updated since 2009). There are other alternatives, listed in the How to access SOAP services from iPhone SO question.

Apple also has a Web Services Core Framework, but there's not much documentation on using it with iPhone.

Franci Penov
Cheers for the very quick response. I'll take a look at your suggestions. Very much appreciated.
Steve
A: 

Look at a sample app code which has soap specific files here: http://mtgr8-a3.svn.sourceforge.net/viewvc/mtgr8-a3/trunk/nvObjects/soap-specific/

In your posting you have mentioned that the 3rd party provided public APIs. If so, can you provide the wsdl? I can covert it to ObjC with SOAP support for you. I am not using wsdl2objC, but something lot better. If it is public API, you don't have to pay me.

Thanks for the response and assistance. The API is at the following URL: http://www.zenfolio.com/zf/help/api/examples/browserI've just taken a look and the WSDL is present (zfapi.wsdl). If it would help to just forward you the WSDL file i will. Thanks again.
Steve
Got it. How do I send the source back to you?
The files are ready. You can pick it up by registering at http://www.mtgr8.com/Demo.phpIts complete xcode project with sample login sequence and GetPopularPhoto query along with a basic UI to show the list of photos.