Xfire generates webservice. Android uses ksoap2 to access the webservice server. xfireksoap2

Source: Internet
Author: User

Xfire generates webservice. Android uses ksoap2 to access the webservice server. xfireksoap2
1. Preparations

I ran a notebook program. Desktop Connection Network. The notebook and my mobile phone are connected to the router at the same time.

If you do not have a vro or wifi, you can find another notebook and download a wifi sharing genie from the notebook. If you don't have a notebook, find a mobile phone. Enable a hotspot and connect your laptop to your hotspot at the same time.

2. Environment Construction

JDK 64-bit 1.8, Myeclipse8.5, tomcat 6.0, and Android sdk.

Connect Myeclipse to tomcat

Http://jingyan.baidu.com/article/4853e1e53465271909f72690.html

Jdk Configuration

Http://jingyan.baidu.com/article/6dad5075d1dc40a123e36ea3.html

Download myeclipse8.5

Http://pan.baidu.com/s/1jGABEaM

Download jdk1.8

Http://pan.baidu.com/s/1o6r6AYA

Tomcat6.0 download

Http://pan.baidu.com/s/1pJ4vMT9

ADT download

Http://pan.baidu.com/s/1dDcpT7N

 

 

3. Server Construction

Use myeclipse to create a web service project


Remember to select xfire


Select the first


Create an interface file in the src directory


Write the following code (of course, I will upload the source code)


Create a new java file to implement the above interface


Write the following code:


Modify the services. xml file


Import xfire package




And all packages under lib



Remember to check all of them. Otherwise, the system will prompt that the class file cannot be found.

Then run the program


If the following information is displayed in the browser, the server is successfully set up.


 

 

4. Create a client

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.