2014-11-03 1 views
0

매개 변수를 전달하여 서버를 호출 할 때 XMLRPC에 문제가 있습니다.안드로이드 오류 추가 매개 변수의 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(); 
    } 

나는 오류입니다 "org.xmlrpc.android.xmlrpcfault : XMLRPC 오류 : 개체 참조가 개체의 인스턴스로 설정되지 않습니다"

내가 할해야합니까?

답변

0

크로스 당신의 XMLRPC 연결이 null이 확인

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

if(client != null){ 

    //your code here 
}