backslash17
backslash17

Reputation: 5390

How to consume web services from a J2ME application

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?

Upvotes: 0

Views: 1451

Answers (2)

Hetal Vora
Hetal Vora

Reputation: 3361

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.

Upvotes: 4

Related Questions