- 浏览: 3566824 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (1491)
- Hibernate (28)
- spring (37)
- struts2 (19)
- jsp (12)
- servlet (2)
- mysql (24)
- tomcat (3)
- weblogic (1)
- ajax (36)
- jquery (47)
- html (43)
- JS (32)
- ibatis (0)
- DWR (3)
- EXTJS (43)
- Linux (15)
- Maven (3)
- python (8)
- 其他 (8)
- JAVASE (6)
- java javase string (0)
- JAVA 语法 (3)
- juddiv3 (15)
- Mule (1)
- jquery easyui (2)
- mule esb (1)
- java (644)
- log4j (4)
- weka (12)
- android (257)
- web services (4)
- PHP (1)
- 算法 (18)
- 数据结构 算法 (7)
- 数据挖掘 (4)
- 期刊 (6)
- 面试 (5)
- C++ (1)
- 论文 (10)
- 工作 (1)
- 数据结构 (6)
- JAVA配置 (1)
- JAVA垃圾回收 (2)
- SVM (13)
- web st (1)
- jvm (7)
- weka libsvm (1)
- weka屈伟 (1)
- job (2)
- 排序 算法 面试 (3)
- spss (2)
- 搜索引擎 (6)
- java 爬虫 (6)
- 分布式 (1)
- data ming (1)
- eclipse (6)
- 正则表达式 (1)
- 分词器 (2)
- 张孝祥 (1)
- solr (3)
- nutch (1)
- 爬虫 (4)
- lucene (3)
- 狗日的腾讯 (1)
- 我的收藏网址 (13)
- 网络 (1)
- java 数据结构 (22)
- ACM (7)
- jboss (0)
- 大纸 (10)
- maven2 (0)
- elipse (0)
- SVN使用 (2)
- office (1)
- .net (14)
- extjs4 (2)
- zhaopin (0)
- C (2)
- spring mvc (5)
- JPA (9)
- iphone (3)
- css (3)
- 前端框架 (2)
- jui (1)
- dwz (1)
- joomla (1)
- im (1)
- web (2)
- 1 (0)
- 移动UI (1)
- java (1)
- jsoup (1)
- 管理模板 (2)
- javajava (1)
- kali (7)
- 单片机 (1)
- 嵌入式 (1)
- mybatis (2)
- layui (7)
- asp (12)
- asp.net (1)
- sql (1)
- c# (4)
- andorid (1)
- 地价 (1)
- yihuo (1)
- oracle (1)
最新评论
-
endual:
https://blog.csdn.net/chenxbxh2 ...
IE6 bug -
ice86rain:
你好,ES跑起来了吗?我的在tomcat启动时卡在这里Hibe ...
ES架构技术介绍 -
TopLongMan:
...
java public ,protect,friendly,private的方法权限(转) -
贝塔ZQ:
java实现操作word中的表格内容,用插件实现的话,可以试试 ...
java 读取 doc poi读取word中的表格(转) -
ysj570440569:
Maven多模块spring + springMVC + JP ...
Spring+SpringMVC+JPA
Accessing a JAX-WS web service from Android
Learn to create a web service client for an Android device
Deepak Vohra, Web Developer
Summary: Web services provide function specific services and are especially suited for mobile devices. KSoap2-android project is a SOAP library for the Android platform. In this article we will access a JAX-WS web service for which a WSDL is provided from an Android client. The web service returns a Hello message in response to a request containing a name. We shall create a web service client for Android using the Eclipse ADT plugin and the KSoap2-android library. We will test the web service client in an AVD (Android Virtual Device). The response from sending a request to a Hello web service with name as the request argument is output on an Android virtual device emulator.
Tags for this article: android, architecture, service, web
Tag this!
Update My dW interests (Log in | What's this?) Skip to help for Update My dW interests
Date: 15 Feb 2011
Level: Intermediate
Also available in: Japanese Portuguese
Activity: 15936 views
Comments: 5 (View | Add comment - Sign in)
Average rating 4 stars based on 19 votes Average rating (19 votes)
Rate this article
Overview
The article contains the following sections:
Pre-requisites
Creating a JAX-WS web service
Installing the ADT Eclipse Plugin & SDK
Creating an Android project
Installing the KSoap2-android library
Creating the Layout
Creating the Activity Class
Configuring Internet Access Permission
Creating an Android Virtual Device (AVD)
Running the Android Client to access the web service
Back to top
Pre-requisites
The article assumes prior knowledge of web services. We shall create a simple JAX-WS web service with a method that takes a name as an argument and returns a Hello greeting. To develop a web service we would need the following software frameworks.
Eclipse IDE
An application server that supports JAX-WS web services. For a beginner tutorial on developing a JAX-WS web service with WebSphere refer Resources.
To develop an Android client for the web service we would require the following software components.
Eclipse IDE
Android SDK
ADT Plugin for Eclipse
KSoap2-android library
Back to top
Creating a JAX-WS web service
A JAX-WS web service essentially consists of a Java class annotated with the javax.jws.WebService annotation, the web service endpoint. A web service may optionally consist of a service endpoint interface that is implemented by the service endpoint implementation class. A web service implementation class must not be abstract or final. Business methods of the implementation class that are to be exposed as operations to a web service client must be public, and must not be static or final. Create a web service implementation class HelloWSImpl, which is annotated with the @WebService annotation and implements the HelloWS interface. The implementation class contains a method hello that takes a String parameter for name and returns a Hello message containing the name. The implementation class is listed in Listing 1.
Listing 1. Web Service Implementation Class HelloWSImpl.java
package hello_webservice;
import javax.jws.*;
@WebService(portName = "HelloWSPort", serviceName = "HelloWSService",
targetNamespace = "http://hello_webservice/",
endpointInterface = "hello_webservice.HelloWS")
public class HelloWSImpl implements HelloWS {
public String hello(String name) {
// replace with your impl here
return "Hello "+name +" Welcome to Web Services!";
}
}
The service endpoint interface HelloWS contains the hello method annotated with the @WebMethod annotation and is listed in Listing 2.
Listing 2. Service Endpoint Interface HelloWS.java
package hello_webservice;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService(name = "HelloWS", targetNamespace =
"http://hello_webservice/")
public interface HelloWS {
@WebMethod(operationName = "hello")
public String hello(String name);
}
Next, generate a WSDL for the web service. The web service shall be made available to an Android client as a WSDL. A WSDL is a document in XML format for describing a web service as a collection of network endpoints, which are also called ports. Messages are abstract definitions of the data being exchanged, and port types are an abstract collections of operations. The Design view of the WSDL for the HelloWSService web service is shown in Figure 1.
Figure 1. Design View of the WSDL
Design View of the WSDL
The WSDL for the web service is shown in Figure 2.
Figure 2. Web service WSDL
Web Service WSDL
Back to top
Installing the ADT Eclipse Plugin & SDK
The Android Development Tools (ADT) is a plugin for Eclipse IDE that provides an integrated environment for developing Android applications. Android SDK provides tools and libraries to develop Android applications. To install the ADT Plugin, select Help>Install New Software... Click on Add. In Add Repository specify a Name and specify Location as https://dl-ssl.google.com/android/eclipse/ as shown in Figure 3. Click on OK.
Figure 3. Creating a Repository for ADT Plugin
Creating a Repository for ADT Plugin
Select the Developer Tools listed as shown in Figure 4. and click on Next.
Figure 4. Installing Developer Tools
Installing Developer Tools
Click on Next in Install Details. Accept the terms of the license agreements and click on Finish. The ADT Plugin gets installed. Next, install the Android SDK. Download the Android starter package (installer_r09-windows.exe for Windows). Click on the installer to start the Android SDK Tools Setup Wizard. The JDK is required to install the Android SDK; install JDK 5.0/6.0 if not already installed. Click on Next. Specify the Install Location (C:\Program Files\Android\android-sdk-windows is the default) and click on Next. Choose a Start Menu Folder and click on Install. The Android SDK Tools gets installed as shown in Figure 5. Click on Next.
Figure 5. Installing Android SDK Tools
Installing Android SDK Tools
Click on Finish. The Android SDK and AVD Manager gets started. Select packages to install from Available Packages. Install the packages shown in Figure 6.
Figure 6. Android SDK and AVD Manager
Android SDK and AVD Manager
Next, configure the Preferences for Android. Select Window > Preferences in Eclipse. In Preferences select the Android node. Specify the SDK Location as shown in Figure 7.
Figure 7. Setting Android SDK Location
Setting Android SDK Location
Back to top
Creating an Android project
Next, create an Android project in which we shall create the web service client for Android. In Eclipse IDE select File > New. In New select Android>Android Project as shown in Figure 8. Click on Next.
Figure 8. New Android project
New Android project
In New Android Project specify a Project name (AndroidWSClient). For Build Target select Android 2.2. In Properties specify an Application name, and a package name. Select the checkbox Create Activity and specify the Activity class (AndroidWSClient). An activity represents a user interaction and the class extending the Activity class creates a window for a UI. Specify the minimum SDK version as 8 and click on Next as shown in Figure 9.
Figure 9. Creating a new Android project
Creating a new Android project
In New Android Test Project a Test Project may be created. We won't be creating a test project. Click on Finish. An Android project gets created as shown in Figure 10. The Android project consists of the following essential components.
An activity class(AndroidWSClient), which extends the Activity class.
A res/layout/main.xml file to specify the layout of the Android application.
An AndroidManifest.xml file, which contains essential information about the application such as the package name, application components, processes, permissions, and the minimum API level for the Android system.
Figure 10. Android project
Android project
Back to top
Installing the Ksoap2-android library
The Ksoap2-android library is a lightweight and efficient SOAP library for the Android platform. Download ksoap2-android-assembly-2.4-jar-with-dependencies.jar from ksoap2-android project. Add the Ksoap2-android assembly JAR, which includes the dependencies to the Java Build Path as shown in Figure 11.
Figure 11. The Ksoap2-android Library
The Ksoap2-android Library
Back to top
Creating the layout
In the res/layout/main.xml specify the layout of the Android UI components. We shall create a UI in which the response from the web service is displayed as a text message. Create a LinearLayout in which sub-elements are displayed in a linear layout, vertically. Add a TextView element, with id result, to display the web service response for a method call to the hello method. The method invocation sends a name as an argument and gets a Hello message as a response. Optionally, create a TextView element for a title. The Graphical Layout of the Android web service-client application is shown in Figure 12. The Android screen is essentially blank with a provision to display a web service response as a text message.
Figure 12. The Graphical Layout
The Graphical Layout
The main.xml layout file is listed in Listing 3.
Listing 3. Layout file main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="" />
<TextView android:id="@+id/result" android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Back to top
Creating the Activity Class
The AndroidWSClient class is the activity class of an Android application and extends the Activity class. In this section we shall construct the AndroidWSClient activity class. Import the required Ksoap2-android classes:
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.ksoap2.serialization.PropertyInfo;
Define constants discussed in Table 1.
Table 1. Constants in Activity Class
Constant Description
NAMESPACE Namespace is the targetNamespace in the WSDL.
URL The WSDL URL. Its value is the location attribute of the soap:address element for a port element in a WSDL. Unless the web service is also hosted on the Android device, the hostname should not be specified as localhost, because the application runs on the Android device while the web service is hosted on the localhost server. Specify hostname as the IP address of the server hosting the web service.
METHOD_NAME The name of the web service operation, which may be obtained form the WSDL.
SOAP_ACTION NAMESPACE+METHOD_NAME specified as a String literal.
The constant values are as follows; the IP address for the URL constant would vary:
private static final String NAMESPACE = "http://hello_webservice/";
private static String URL="http://192.168.1.68:7001/HelloWebService/HelloWSService?WSDL";
private static final String METHOD_NAME = "hello";
private static final String SOAP_ACTION = "http://hello_webservice/hello";
All Activities must implement the onCreate method for activity initialization. Define the UI using the setContentView method and the layout resource.
setContentView(R.layout.main);
Create an Android widget TextView object using the findViewById method on the TextView element defined in the main.xml.
TextView lblResult = (TextView) findViewById(R.id.result);
Create a org.ksoap2.serialization.SoapObject object to build a SOAP request. Specify the namespace of the SOAP object and method name to be invoked in the SoapObject constructor.
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
Create a org.ksoap2.serialization.PropertyInfo object to contain property information to be sent with the SOAP method call. Each property requires a new PropertyInfo object. The hello method takes only 1 argument for a name. Set the property name as "arg0", and specify the type of the property as STRING_CLASS. Add the PropertyInfo object to the SoapObject using the addProperty method.
PropertyInfo propInfo=new PropertyInfo();
propInfo.name="arg0";
propInfo.type=PropertyInfo.STRING_CLASS;
request.addProperty(propInfo, "John Smith");
Next create a SOAP envelop. Use the SoapSerializationEnvelope class, which extends the SoapEnvelop class, with support for SOAP Serialization format, which represents the structure of a SOAP serialized message. The main advantage of SOAP serialization is portability.
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
The constant SoapEnvelope.VER11 indicates SOAP Version 1.1. Assign the SoapObject request object to the envelop as the outbound message for the SOAP method call.
envelope.setOutputSoapObject(request);
Create a org.ksoap2.transport.HttpTransportSE object that represents a J2SE based HttpTransport layer. HttpTransportSE extends the org.ksoap2.transport.Transport class, which encapsulates the serialization and deserialization of SOAP messages.
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
Make the soap call using the SOAP_ACTION and the soap envelop.
androidHttpTransport.call(SOAP_ACTION, envelope);
Get the web service response using the getResponse method of the SoapSerializationEnvelope object and cast the response object to SoapPrimitive, class used to encapsulate primitive types.
SoapPrimitive resultsRequestSOAP = (SoapPrimitive) envelope.getResponse();
Set the String message in the SOAP response in the TextView UI component.
lblResult.setText(resultsRequestSOAP.toString());
The Activity class is listed below in Listing 4.
Listing 4. Activity Class AndroidWSClient.java
package android.webservice.client;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapPrimitive;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import org.ksoap2.serialization.PropertyInfo;
import android.widget.TextView;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
public class AndroidWSClient extends Activity {
private static final String NAMESPACE = "http://hello_webservice/";
private static String URL = "http://192.168.1.68:7001/HelloWebService/
HelloWSService?WSDL";
private static final String METHOD_NAME = "hello";
private static final String SOAP_ACTION = "http://hello_webservice/hello";
private TextView lblResult;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
lblResult = (TextView) findViewById(R.id.result);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo propInfo=new PropertyInfo();
propInfo.name="arg0";
propInfo.type=PropertyInfo.STRING_CLASS;
request.addProperty(propInfo, "John Smith");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive resultsRequestSOAP = (SoapPrimitive) envelope.getResponse();
lblResult.setText(resultsRequestSOAP.toString());
} catch (Exception e) {
}
}
}
Back to top
Configuring Internet Access Permission
To access a web service from an Android device we need to enable a permission in AndroidManifest.xml that allows applications to open network sockets. Add the following uses-permission element.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
The AndroidManifest.xml with the permission set is shown in Figure 13.
Figure 13. Setting the INTERNET Permission
Setting the INTERNET Permission
The AndroidManifest.xml is listed in Listing 5.
Listing 5. AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.webservice.client"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".AndroidWSClient"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-sdk android:minSdkVersion="8" />
</manifest>
</uses-permission>
Back to top
Creating an AVD
Android SDK provides a mobile device emulator, a virtual mobile device to develop and test Android applications. The emulator supports Android Virtual Device (AVD) configurations with which other virtual mobile device options such as Android platform may be specified. To create an AVD click on Window>Android SDK and AVD Manager. Click on Virtual devices and click on New as shown in Figure 14.
Figure 14. Creating an AVD
Creating an AVD
In Create New AVD specify a Name, select Target as Android 2.2-API level 8. Specify SD Card size as 100 MiB, which should be sufficient to install the web client application. Specifying a lower value such as 10 may generate a "No space left on device" error. Click on Create AVD to create an AVD as shown in Figure 15.
Figure 15. Configuring AVD
Configuring AVD
A new AVD get created as shown in Figure 16.
Figure 16. New AVD
New AVD
Back to top
Running the Android Client to access the web service
The Android emulator provides various options to customize the emulator. For example, to scale the emulator specify the scale value with the following option.
-scale <value>
To specify an emulator option right-click on the AndroidWSClient application and select Run As..>Run Configurations. Select the AndroidWSClient application and specify the -scale option in field Additional Emulator Command Line Options and click on Apply as shown in Figure 17.
Figure 17. Setting the Emulator scale Option
Setting the Emulator scale Option
To install and run the AndroidWSClient application on the emulator right-click on AndroidWSClient and select Run As..>Android Application as shown in Figure 18.
Figure 18. Running the Android Application
Running the Android Application
The AndroidWSClient application gets installed on the AVD as shown in Figure 19. Click on the application to run the web service client in the AVD.
Figure 19. Android web service client installed
Android Web Service Client Installed
The web service gets invoked and the response from the web service gets displayed in the Android emulator as shown in Figure 20.
Figure 20. Accessing the web service
Accessing the Web Service
The output from the running the Android application is shown in Listing 6.
Listing 6. Output from Android Application
AndroidWSClient] Android Launch!
AndroidWSClient] adb is running normally.
AndroidWSClient] Performing android.webservice.client.AndroidWSClient activity launch
AndroidWSClient] Automatic Target Mode: launching new emulator with compatible AVD
'AndroidAVD'
AndroidWSClient] Launching a new emulator with Virtual Device 'AndroidAVD'
AndroidWSClient] New emulator found: emulator-5554
AndroidWSClient] Waiting for HOME ('android.process.acore') to be launched...
AndroidWSClient] HOME is up on device 'emulator-5554'
AndroidWSClient] Uploading AndroidWSClient.apk onto device 'emulator-5554'
AndroidWSClient] Installing AndroidWSClient.apk...
AndroidWSClient] Success!
AndroidWSClient] Starting activity android.webservice.client.AndroidWSClient on device
emulator-5554
AndroidWSClient] ActivityManager: Starting: Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER]
cmp=android.webservice.client/.AndroidWSClient }
When the Android application is run the following tasks are performed.
A new emulator gets launched
The AndroidWSClient.apk gets uploaded to the emulator
The AndroidWSClient.apk gets installed
The android.webservice.client.AndroidWSClient activity gets started
Resources
Learn
Learn about Android. Tools and documentation on how to create Android applications.
In the SOA and web services zone on developerWorks, get the project resources you need to advance your web services skills.
""Develop and deploy JAX-WS Web services on WebSphere Application Server Community Edition V2.0" (developerWorks, Sept 2007) as a tutorial on developing and deploying JAX-WS web services with WebSphere application server.
Get products and technologies
Download the Android SDK.
Download the ksoap2-android library.
Download the latest version of Eclipse for Java EE.
About the author
Deepak Vohra is a Sun Certified Java programmer, and Sun Certified Web Component Developer. Deepak has published in Java Developer's Journal and XML Journal.
Rate this article
Average rating 4 stars based on 19 votes Average rating (19 votes)
1 star1 star
2 stars2 stars
3 stars3 stars
4 stars4 stars
5 stars5 stars
Comments
Add comment:
Sign in or register to leave a comment.
Note: HTML elements are not supported within comments.
Notify me when a comment is added1000 characters left
Total comments (5)
I get this error
could you help me?
org.xmlpull.v1.XmlPullParserException:
expected: START_TAG
{http://schemas.xmlsoap.org/soap/envelope/}Envelope
(position:START_TAG <html>@1:6 in java.io.InputStreamReader@44f571f0)
Posted by jairodealmeida on 16 August 2011
Report abuse
If you are going against large robust applications like WebSphere Commerce, Web services is the implementation model on the server side. But there could be a business case for lightweight protocols like Rest or Json for the mobile client. So how do you mediate between the two, you don't want to burden the client or the server with these integration issues. So inserting a product like DataPower to handle the mediation is an excellent option, and can handle the services security requirements as well.
Posted by CharltonLee on 15 February 2011
Report abuse
Interesting. Could be interesting to explore more lightweight protocol like Rest or Json.
Posted by drom on 15 February 2011
Report abuse
Interesting...
Posted by @mikedroid on 14 February 2011
Report abuse
Interesting...
Posted by @mikedroid on 14 February 2011
Report abuse
相关推荐
在Android平台上,WebServices是一种常用的技术,用于实现应用程序与远程服务器之间的数据交换。在这个特定的案例中,"android WebServices 电话号码归属地查询"是一个应用程序,它利用WebServices接口来查询电话...
调用WebServices流程,详情http://blog.csdn.net/zimo2013/article/details/38037989和http://blog.csdn.net/zimo2013/article/details/38036289
在`Demo3_webServices`示例项目中,我们可以预期看到一个简单的Android应用,该应用展示了如何调用一个Web服务并处理返回的数据。项目可能包含以下几个关键部分: - 主Activity:负责触发Web服务请求,展示请求结果...
在Android开发中,调用Web服务是常见的需求,主要用于实现移动应用与远程服务器的数据交互。Web服务,如SOAP(简单对象访问协议)或RESTful API,可以提供数据接口供客户端应用进行请求和响应。本实例将详细介绍如何...
总结来说,"WebServices服务端和客户端DEMO"涵盖的内容广泛,包括Spring Boot的使用、Apache CXF的集成、服务端Web Services的创建、以及客户端的SOAP请求和响应处理。理解这些概念和技术对于开发分布式系统和实现跨...
本实例主要关注的是如何调用天气预报相关的Web Services,这是一个常见的跨平台、跨语言的数据交换技术,广泛应用于移动应用、网站以及企业级系统的集成。 首先,我们需要了解Web Services的基本概念。Web Services...
在Java和Android开发中,访问WebServices接口是常见的需求,用于获取服务器端的数据或者实现远程调用功能。本实例将详细介绍如何在Java(特别是针对Android环境)中实现对WebServices的调用。 首先,我们要理解Web...
在Android开发中,访问Web Services是一项常见的任务,用于与服务器端进行数据交互。Web Services可以是基于SOAP(简单对象访问协议)或者RESTful(表述性状态转移)的API,它们提供了一种跨平台、跨语言的数据交换...
### 基于Web Services的旅游系统设计与实现 #### 概述 本文探讨了基于Web Services技术构建的旅游系统的设计与实现方案。随着信息技术的进步和互联网的普及,特别是Web Services技术的成熟,旅游行业的信息化水平...
android wsdl 实现webServices
标题中的"WEBservices"指的是这些网络服务,它们通常是RESTful(Representational State Transfer)或SOAP(Simple Object Access Protocol)类型的API。RESTful API是目前最流行的选择,因为它轻量级、易于理解和...
### Android 实现 WebServices 的实例及讲解 在移动应用开发领域,尤其是Android平台上,与后端服务进行交互是一项常见的需求。Web Services作为一种重要的技术手段,为Android应用提供了强大的后端支持能力。本篇...
在这个场景中,我们将讨论如何在Android应用中通过Webservices来获取和展示数据。 1. **Android网络访问基础**:在Android中,所有网络操作都应在后台线程中执行,以避免阻塞主线程导致应用无响应。可以使用...
配置环境:vs2012 jdk jre sdk xamarin mono ...实现功能:实现xamarin mono for android调用webservice接口登录,界面简单布局,使用android样式,自建webservices接口应用程序 关键字:xamarin mono http web 接口
在Android开发中,有时我们需要与服务器进行交互,这时就可能涉及到调用Web服务,特别是Web Service接口。本实例主要讲解如何使用ksoap2这个库来调用Java或.NET的Web服务。ksoap2是一个轻量级、高效且功能丰富的...
这个是我自己实践,加查询资料链接成功的心得!希望能对大家有所帮助,解析SoapObject如果有人能直接转化成java对象还希望指教下。里面如果谁不清楚请密我 303743000,下载了以后我包售后呵呵
根据给定文件内容,以下是对标题“Android平台上属性约简贝叶斯优化Web Services分类选择算法研究.pdf”所蕴含知识点的详细阐释: 标题所蕴含的知识点: 1. Android平台:这是一个由Google主导的开源操作系统,...
在"WebServices中使用rxjava+ksoap2进行请求接口数据"这个主题中,我们将探讨如何结合这两个库来高效地处理网络请求。首先,我们需要在项目中引入RxJava和Ksoap2的依赖库。然后,我们可以创建一个Observable,使用...