envelope.getResponse() is null?
<p>A simple user login,call webservice interface
activity:</p>

<pre><code>public void login(){
final String uname=et_username.getText().toString().trim();
final String upwd=et_userpwd.getText().toString().trim();
if("".equals(uname)||uname==null ){
Utils.showToast(LoginActivity.this, "User name cannot be empty!");
}else if("".equals(upwd)||upwd==null){
Utils.showToast(LoginActivity.this, "The password can't empty!");
}else{
Utils.showProgress(LoginActivity.this, R.string.please_wait, R.string.connect_server);
Thread thread=new Thread(new Runnable() {
public void run() {
Looper.prepare();
try {
MemberService ms=new MemberService(LoginActivity.this);
Member member=ms.login(uname, upwd);
if(member.isSuccess()){
Utils.dismissProgressDialog();
Utils.showToast(LoginActivity.this, "Login successful!");
Bundle bundle =new Bundle();
bundle.putString("UCode", member.getUserName());
Utils.startActivity(LoginActivity.this, IndexActivity.class, bundle);

}else{
Utils.dismissProgressDialog();
Utils.showToast(LoginActivity.this,"Login failed!");
}
} catch (Exception e) {
Log.e("LoginActivity", e.getMessage(),e);
Utils.dismissProgressDialog();
}
Looper.loop();
}
});
thread.start();
}
}
</code></pre>

<p>call</p>

<pre><code>public Member login(String userName,String userPwd){
Member member=new Member() ;
try {
String result="";
String nameSpace="http://tempuri.org/";
String methodName="Login";
String url=Global.address;
String soapAction=nameSpace+methodName;
SoapObject request=new SoapObject(nameSpace,methodName);
request.addProperty("UCode",userName);
request.addProperty("UPassword", userPwd);
SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet=true;
envelope.bodyOut=request;
HttpTransportSE ht=new HttpTransportSE(url);
ht.call(soapAction, envelope);
ht.debug=true;
if(envelope.getResponse()!=null){    SoapPrimitive response=(SoapPrimitive)envelope.getResponse();
result=response.toString();
System.out.println("result=========="+result);
JSONArray json=new JSONArray(result);
JSONObject object=json.getJSONObject(0);
member.setMessage(object.getString("msg"));
member.setRole(object.getString("role"));
member.setStatus(object.getInt("status"));
}
} catch (Exception e) {
e.printStackTrace();
}

return member;
}
</code></pre>

<p>dubug if(envelope.getResponse()!=null）,there is null.but the envelope.getResponse() is null???</p>

<p>i don't konw why?ask for help.
i don't work for webservice,and study android only for one week</p>
