"Android Demo" get today's weather with webservice--go

Source: Internet
Author: User

Because they're doing it themselves. NET aspect, now in learning Android, so want to achieve Android through the WebService interface to obtain data, many examples on the internet there are problems. Reference: Android through WebService network programming, using the tool class to easily implement this blog, or to achieve through a public webservice to get today's weather conditions such a feature. The implementation results are as follows:

Sometimes we need to use the WebService interface to obtain data, WebService is a SOAP protocol-based remote call standard, through WebService can be different operating system platform, different languages, different technologies to integrate into one piece. The library that calls WebService is not available in the Android SDK, so you need to use a third-party SDK to call WebService. The PC version of the WebService client library is very rich, such as AXIS2,CXF, but these development packages are too large for Android and may not be easily ported to Android systems. Therefore, these development packages are not within our scope of consideration. Suitable for mobile phone WebService Client SDK Some, more commonly used have KSOAP2, can be downloaded from http://code.google.com/p/ksoap2-android/wiki/HowToUse?tm=2, Add the jar package to the Libs directory.

Http://www.webxml.com.cn/zh_cn/web_services.aspx There are some free webservice interfaces, where the address of the weather interface is: http://www.webxml.com.cn/ Webservices/weatherwebservice.asmx

Here is the WebService method diagram:

Specific code can look at the example, the explanation is quite clear: webservicetry.zip

"Android Demo" get today's weather with webservice--go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.