views:

970

answers:

3

I'm going to use gSOAP to interact with a WCF webservice in my Mac project. It does pretty much exactly what I need and it does it well (pretty much the exact opposite of WSMakeStubs;)). The only downside is that it's C/C++ only, meaning I either need to convert all my types into C types on the fly or write a complete wrappering solution to do it for me.

I'd rather not reinvent the wheel here, and I'm obviously not the only one who has wanted to do this, but so far I haven't been able to find anybody who has actually posted any code to this effect.

Does anybody know of any code available that would save me from having to write the whole thing myself?

+1  A: 

(It doesn't quite answer your question, but) I've used the techniques used in Cocoa SOAP Client (open source) to connect to a server and send/receive SOAP requests. It works really well, unless you are connecting to a server with a self-signed SSL certificate.

(This basically translates XML structures into native Cocoa structures, and back the other way on sending).

We use gSOAP at work, and it does the job, but makes lots of generated code, and limits you to working in particular ways with the data.

Matthew Schinckel
Sorry for the nob question. Can "SOAP Client" be used in an iPhone project? I am having trouble figuring out the best way to consume web services.
JWD
I suggest you consider asking this as a standalone question.
Matthew Schinckel
+1  A: 

I'm working on a wrapper generator (or possibly modifications to gSOAP itself to contribute back); I'm not done and won't be for a little while.

Note: I'm one of the folks you linked to.

Austin Ziegler
Very glad to hear it!If you think of posting back here when you're ready to share it I'd love to know that it was available for experimenting with.
Lawrence Johnston
A: 

I'd say the current answer is "No".

I ended up creating an Objective-C wrapper mostly by hand for my web service (including category methods for NSArray to translate an NSArray of X into a soap array of X and vica versa, etc) since it was a one-off and I did not expect it to change particularly often. I'm happy with it, but I do need to modify it by hand whenever a signature is changed or a method is added.

Lawrence Johnston