我試圖連接web服務與我的android應用程序,但它有一個錯誤時聲明SoapObject。請幫我解決它們!非常感謝你。這是我的代碼:Android無法連接到.net網絡服務
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final String Soap_Action = "http://huroid.com/AndroidGetAllUser";
final String Soap_MethodName = "AndroidGetAllUser";
final String Soap_NameSpace = "http://huroid.com/";
final String Soap_URL = "http://huroid.com/UserService.asmx?op=AndroidGetAllUser";
//CallService
try{
SoapObject request = new SoapObject(Soap_NameSpace, Soap_Action);
}
catch(Exception e){
Toast.makeText(this, "Error", Toast.LENGTH_LONG);
}
adpUser.notifyDataSetChanged();
}
和錯誤發生在這一行:
SoapObject request = new SoapObject(Soap_NameSpace, Soap_Action);
我沒有方法已瞭解以確定肥皂命名空間和方法。 :(