• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Moving data records, best solution

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my thoughts on this design.
Use XML to move the data from MIDLet to Servlet, and back and forth, and have classes that read the XML and transform it into whatever structure is needed on each end.
On that end, JAXB works on the Servlet side. Is it available on MIDLets? Is that overkill?
Should XML be the bases for things like transfering classes between Handheld devices and other servers? I know there is an RMI solution, but some part of me things that for many things would be a little overkill.
What are the best practices for Handheld devices?
Thanks
Mark
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML is a good choice for mobile integration. There are several SAX based lightweight XML parser available for J2ME (including MIDP). My personal favorite is kXML -- it can build DOM trees for you too. In addition, you can even consume SOAP web services on MIDP devices using the kSOAP library. For detailed discussion and tutorial on kSOAP v1.2, please refer to my earlier article:
http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-wireless.html
JSR 172 has just released the public review of the J2ME JAC-RPC specification. It has an XML parser and a SOAP parser. It is based on RMI and runs on both MIDP and PP.
http://www.jcp.org/en/jsr/detail?id=172
The relationship between JSR 172 and kSOAP is sort of like JAX-RPC versus Axis. One is Java centric while the other is XML centric.
There are also special MIDP parser to read RSS feeds etc. Of course, XML might a little too heavy for some apps. For those apps, you can always tunnel binary data through HTTP using custom designed protocols. If you are interested in this subject, come to my JavaOne talk in June.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are interested in this subject, come to my JavaOne talk in June.

You already know that I am there.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic