webservice 里的接口
public
strin
g Login(string name,string pwd )
android里的传递给Login接口的参数名称必须与login参数名字一致否则连不上服务器
Map<String, String> values =
new
HashMap<String, String>();
values.put(
"name"
,
tvUsrName
.getText().toString());
values.put(
"pwd"
,
tvUsrPwd
.getText().toString());
Request(
METHOD_Login
,values);
android取回返回值
方法1: SoapObject resultsp = (SoapObject)envelope.
bodyIn
;
str=String.
valueOf
(resultsp.getProperty(
0
) );
//result.toString();
return
str;
方法2 Object resultsp = (Object)envelope.getResponse();
return
resultsp.toString();