james (1129)

Cocoa

So today I seriously sat down to write some code in Cocoa - I've had a hankering for it for the last little while, and acme's work with offline clients at work has been pushing me a little closer to actually doing something about it...

I was impressed with the little I'd seen before, but now I'm wowed. Everything seems to fit together in just the right way, and its lovely to work with.

I do have a problem however. I want to get my nice little application to call some SOAP services. There is no Objective-C SOAP library that I can find, so I'm kinda hovering between a few options.

Link the App with CamelBones, write the SOAP client in Perl with SOAP::Lite. Pros: easy Cons: need to distribute app with CamelBones and Perl

Write the client uploader class in Java, and distribute that instead. I'm trying this at the moment, but I can't seem to call a Java method from an Objective-C class. Nothing I read seems to suggest that this is, or isn't possible. Hmm, maybe I should change strategies.

Write an Objective-C SOAP library. At the moment, this seems the least achievable, but the most desireable

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Please Log In to Continue

I'm convinced that shipping CamelBones apps should be really simple. You should be able to copy the relevant.so and.pm files into the new apps' Contents/Resources directory. After all, Perl comes with OSX. Or something.

Of course I'm yet to manage it. But I'm sure it's possible. I'd love someone to write up how to do it.

It is vaguely simple to make shippable.app with camelbones. I've done it with JournalX [rubberband.org].

The main thing you have to do is recompile the camelbones framework to be distributable within the application. There is an article [cocoadevcentral.com] that discribes what you have to do to compile the framework, and then how to copy and reference the framework in your application.

Of course, if you've got someone whose installed a different version of Perl from you then it will prove difficult. However, now I've figured out how to use the Cocoa/Java bridge life is easy.

I'm very impressed with the C/J bridge - I've not had a problem with type munging yet (but then again I'm passing simple strings). Its not like I've never seen a piece of glue like this before -- I mean Perl does it all the time -- but its always impressive to see it done so well in another language:-)