android 开发 webservicepackage com.xlh.laogao;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import javax.xml.rpc.ServiceException;
public class Relative extends Activ...
package com.xlh.laogao;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import javax.xml.rpc.ServiceException;
public class Relative extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tx = new TextView(this) ;
String endPoint = "http://localhost:8888/test/services/SayHello" ;
Service service = new Service() ;
Call call = (Call)service.createCall() ;
call.setTargetEndpointAddress(new java.net.URL(endPoint)) ;
call.setOperationName("getName") ;
String str = null ;
try {
str = (String)call.invoke(new Object[]{"高建华"}) ;
}catch(Exception e) {
e.printStackTrace() ;
}
//call.invoke(new Object[]{"lk"}) ;
tx.setText(str) ;
setContentView(tx);
}
}
本文档为【android 开发 webservice】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。