Apache-CXF generates client-side SOAP stack for the iPhone

2008-04-13 Software-Engineering Mobile Web-Services SOAP SOA

Yep. It was inevitable. Sooner or later we need to talk about the iPhone.

And there is a lot to talk about ...

  • the innovative hardware
  • the business model behind it
  • the market this device might be able to create
  • and a lot of other disruptive changes that come with it
But today I just want to talk about a neat feature that I discovered in Apache-CXF.

In January I was looking for ways to make the mobile device a first-class citizen in a distributed SOA. Right now, there are probably three platforms types that you can consider when it comes to mobile devices and the integration of mobile devices with (SOA) backend systems:
  • Native - means you are using a platform SDK (e.g. .Net, Symbian, iPhone SDK) and write applications directly for a given platform.
  • JAVA - means you are using the JAVA ME platform. Potentially/Hopefully in combination with an OSGi container.
  • Browser - means you are using a browser and implement your application as (AJAX-based) WebApplications (XHTML, CSS, JavaScript (with XmlHttpRequest objects).
Right now, you can develop applications for the iPhone using option 1 and 3. Option 2 is not an option, because there is no JVM for the iPhone (but SUN recently announce that this will change later in the year :)).

Option 3 got a lot of merits, but leaves you with the daunting task to write all of the JavaScript marshaling code yourself :(.

And here is where the miracle happens: The next version of Apache-CXF (2.1) has a feature that allows you to generate JavaScript client-side code for WebServices. Either from an WSDL file or from annotated JAVA source code or dynamically at runtime.

It makes writing WebApplications for the iPhone so much easier.

I have ported some of the CXF demos to the iPhone. The podcast, the presentation and the source code is available on open.iona.com and on www.tritsch.org.

Check it out. Feedback welcome.