Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中的XMLRPC错误额外参数_Android_Xml Rpc - Fatal编程技术网

android中的XMLRPC错误额外参数

android中的XMLRPC错误额外参数,android,xml-rpc,Android,Xml Rpc,当我传递参数来调用服务器时,XMLRPC有问题 JSONObject s_profile = new JSONObject(); s_profile.put("token", tokenId); s_profile.put("lname", Fname.getText().toString()); s_profile.put("lname", Lname.getText().toString()); s_profile.put("address", add

当我传递参数来调用服务器时,XMLRPC有问题

    JSONObject s_profile = new JSONObject();
    s_profile.put("token", tokenId);
    s_profile.put("lname", Fname.getText().toString());
    s_profile.put("lname", Lname.getText().toString());
    s_profile.put("address", address.getText().toString());
    s_profile.put("city", city.getText().toString());
    s_profile.put("state", state.getText().toString());
    s_profile.put("homePhone", homephone.getText().toString());
    s_profile.put("cellphone", cellphone.getText().toString());
    s_profile.put("zipcode", zipcode.getText().toString());
    s_profile.put("contactname", contact.getText().toString());
    s_profile.put("contactphone", phone.getText().toString());
    XMLRPCClient client = new XMLRPCClient(Config.urlApi);
    try {

         obj = (HashMap<String, String>) client.call("requestUpdatePatientProfile",s_profile.toString());

    } catch (XMLRPCException e) {
            // TODO Auto-generated catch block
        e.printStackTrace();
    }
JSONObject s_profile=new JSONObject();
s_profile.put(“令牌”,令牌ID);
s_profile.put(“lname”,Fname.getText().toString());
s_profile.put(“lname”,lname.getText().toString());
s_profile.put(“address”,address.getText().toString());
s_profile.put(“city”,city.getText().toString());
s_profile.put(“state”,state.getText().toString());
s_profile.put(“homePhone”,homePhone.getText().toString());
s_profile.put(“手机”,mobile.getText().toString());
s_profile.put(“zipcode”,zipcode.getText().toString());
s_profile.put(“contactname”,contact.getText().toString());
s_profile.put(“contactphone”,phone.getText().toString());
XMLRPCClient client=新的XMLRPCClient(Config.urlApi);
试一试{
obj=(HashMap)client.call(“requestUpdatePatientProfile”,s_profile.toString());
}捕获(XMLRPCException e){
//TODO自动生成的捕捉块
e、 printStackTrace();
}
我得到的错误是“org.xmlrpc.android.xmlrpc故障:xmlrpc故障:对象引用未设置为对象的实例”


我必须这样做吗?

交叉检查您的XMLRPC连接是否为空

 //..
 XMLRPCClient client = new XMLRPCClient(Config.urlApi);

 if(client != null){

   //your code here
 }