A bit of project research

Associate
Joined
3 Oct 2006
Posts
2,304
Location
London
Hi,

So i'm looking at developing an application for a mobile device. This application produces data and saves it to an xml file.

What I want to be able to do with this xml file is to then have the program upload it to a database on a webserver. The user can then access this data from a website (on a desktop computer, rather than the movile) and have a look at the break down of all the data and previous data recorded.

This is a bit of a larger project than those I have previously attempted, mainly because it is using two interacting systems rather than just one sole system. What I'm trying to research into is the best way to get the xml data to the webserver.

Having had a SOAP webservice demonstrated to me not long ago, I was considering attemping to use SOAP to upload my xml data to the database, but upon futher reading it seems to me that SOAP is very one way - for getting data from a database, rather than putting data into a database. Am I correct in my thinking? If so, can anyone suggest the 'best' technique to get xml data into a webserver database from a remote device?

I hope this post makes sense, and any advice would be greatly appreciated.

Kind regards,

JonB
 
Hi JonB

A web service sounds like a good solution for this. Essentially you would implement a web service on your server that the mobile client would invoke, passing the XML as a SOAP message. The web service would then receive this, parse the XML and populate the database accordingly.

SOAP is basically just a "protocol for exchanging XML-based messages."

Hope that makes sense.
 
Ok, so I could use SOAP to 'upload' some xml based data?

Any recommended languages to write the web service in? What is PHP like with SOAP?
 
PHP, Java, Objective-C are the languages I'm familiar with. As for frameworks/platforms, not really had great experience with any.

Would any of these do? If not would it be difficult to pick up C#?
 
Hi,

You might also want to look at RESTful web-services, Ajax and possibly JSON as alternatives to SOAP and web-services. The new JSR172 (Mobile devices using Web-Services) might also be worth investigating - don't know much about that though.

Implementing web-services in Java isn't particularly straightforward depending on the tool you use for the job. For example I found NetBeans to be far easier to use for this particular task than MyEclipse.

Using SOAP from Java isn't too hard up to a point. Sending a message, getting it received, and unpacking it is pretty easy. However, the hard stuff starts when you need to consider things such as what happens if the message fails, should it be sent only once, is an acknowledgement sent etc. You then get into the WS-* stuff and it becomes quite involved. The same kind of questions also need to be asked if using other methods as well.

The SOAP development I did was deployed onto Tomcat, and I found it quite difficult to get Tomcat configured to handle things, needing the Axis plug-in if I remember right. Using SunOne made everything much easier, so the choice of deployment platform is yet one more thing to consider carefully.

Hope that's of some help,
Jim
 
Hi JonB.

I'm a mobile developer as my job, so I'm happy to give advice on that side. I've just completed an application, based heavily on a client making use of web services. The web services were written in .net, and the client Java ME, with JSR172 support.

Decide on exactly what data needs to be exchanging, give it some formal specification, and write / generate the WSDL. Using an IDE, you can then point it at the WDSL and it will generate the client side java code automatically, to allow you to consume the web service. It's really easy, just remember to handle networking in different threads, I'm using Netbeans 6.1 for my IDE.

Let me know if you need any help.

Ross
 
Back
Top Bottom