Mobile Applications and Web Services

symbian.gifI am not a great fan of consuming web services from mobile JAVA or Symbian applications. They just seem to complicate mobile development unnecessarily. Also, applications tend to get bloated with service related code making them significantly larger (to download, use more memory etc) while the service calls themselves result in extraneous data being passed back and forward.

Take S60 for example. In a recent project I had to use some web services that were all that were provided by the server. I started off using a port of gSOAP (incidentally Sony Ericsson Developer World have a great tutorial) as this gave me full visibility of the service source code and allowed me to support S60 2nd and 3rd. However, I found that the Symbian port excluded some things, for example, support for datetime that were declared in the web service description language (WSDL). I tinkered with the gSOAP library a bit but gave up when I realised that adding support for the missing features was probably going to be non-trivial.

I moved on to the Nokia supplied WSDL to C++ Wizard that unfortunately only works for S60 3rd (not 2nd). It also requires that you include and install a XmlDataBinding.sis within your own sis – that is a needless distraction for the end user when they are prompted to also install this. Once you have worked out how to use the generated code (it isn’t that well documented) it all works very well but the whole concept really is using a sledgehammer to crack a nut.

Instead of web services, for designs where you have control of what the server provides, I favour simpler http GET/POST requests that don’t used SOAP and just return structured information such as delimited lists of things, encoded images or, if you must, XML. (ie REST style calls). All this is much simpler to achieve and more efficient.