Categories
Featured iPhone Development Resources iOS Programming Tools And Utilities Open Source iOS Libraries And Tools

Tool: SOAP Based Web Services Made Easy On The iOS Platform

In the past I’ve written quite about some of the great projects for consuming REST based web services on iOS devices such as MKNetworkKit, AFNetworking, and RestKit.

On the weekend I received a question from a developer trying to work with a SOAP based web service asking about up to date available resources for iOS and Objective-C.

I haven’t written much about SOAP based web services, but if you have no choice other than to work with a SOAP based service directly within your apps here are a few choices.

An Easy Objective-C Project Generation Tool Using WSDL Files

The easiest way to go is to use a tool known as SudzC by Jason Kichline.

What SudzC allows you to do is upload a WSDL file for the SOAP based service, and it will automatically generate a working Xcode example project (complete with comments and document) including other source files for using the web service such as  those for LibXML, and Jason’s own code for working with a SOAP based service.

Recently SudzC has been recently updated for the iOS 5 SDK and can now generate projects with support for ARC.

You can create the projects right on the SudzC website here.

SudzC is open source, and you can find the Github repo here.

An Example Project On Consuming Web Services

You can learn quite a bit looking through the generated project from SudzC, but you may also want to take a look at Adrian Kosmaczewski’s demonstration project written in Objective-C on consuming web services from an iOS application here.

A C++ Library

If you decide that you want to go the library route, one library that is recommended to those asking about consuming a SOAP based web service on the iOS paltform is Gsoap. I can’t understand why you’d want to go this route unless you are looking for a solution that would be similar across different platforms.

Hopefully this helps those working with a SOAP based web service.

6 replies on “Tool: SOAP Based Web Services Made Easy On The iOS Platform”

Hi!  I went to sudzc website and generated code for my wsdl (yesterday). The generated code still doesn’t use ARC. When I start a new project (in xcode 4) and add the three directories and compiles (after properly linking the libraries), it is generating errors.  How can I get sudzc to generate code for iOS5? Thanks much.

I’ve tried sudzc, but I havent quite figured out how to get the system to take my parameters.  I used soapUI to help me generate my soap request, but although I can add to the headers tag by using services.header = NSDictionaryObject… it only adds a tag and does not populate the tag that’s already in that request.  Has anyone gotten their WSDL to work? all I find are people saying thanks but no information about posting values to their soap objects…

do you have a quick minute or two to help me dive through my WSDL? like I stated before I can get it to respond from my server so it’s doing something, and the webservice responds when I run it through soapUI, I even modified the envelope so I pass it a valid value and it responds with good data.  If you have a quick minute to look this over it would be so helpful to me 🙂

I found a small bug.  If the returning SOAP data has the namespace specified like in the following:

FULL 2.0

SoapRequest.connectionDidFinishLoading is looking for Body and not for soap:Body

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.