I need to access a web service from a J2ME application. Any good advice or example about how to consume web services from this framework?
+1
A:
For SOAP webservices: If you have a J2ME device which has JSR 172, you can create webservice client stubs and call the webservice methods on those stubs. However, JSR 172 is not widely available on most of the devices. The better way would be to use KSOAP2 to create SOAP requests and invoke your webservice methods.
For REST web services: You would just need to use HTTP Connection classes.
For parsing the XML response, you can use KXML2. Its a good third party library.
Hetal Vora
2010-04-28 03:49:15