开发者

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?


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.


See Introduction to J2ME Web Services and Understanding the Web Services Subset API for Java ME

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜