我正在尝试将 Web 服务与我的 android 应用程序连接,但在声明 SoapObject 时出现错误。请帮我解决它们!非常感谢。这是我的代码:
@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);
我不了解识别肥皂名称空间和方法的方法。:(