lang.ClassCastException: java.lang.Integer android xml rpc
<p>i'm ahaving an issue while trying to make an xml rpc request. my serive crashes whith the logcat saying lang.ClassCastException: java.lang.Integer  at the line 35 of my code which coresponds to the client call <strong>* >>> text = (String) client.call&lt;&lt;&lt;&lt;&lt;*</strong>.</p>

<pre><code>package tfe.rma.ciss.be;

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.URI;
import java.util.Enumeration;

import org.xmlrpc.android.XMLRPCClient;
import org.xmlrpc.android.XMLRPCException;

import android.app.Service;
import android.content.Intent;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.IBinder;
import android.widget.Toast;

public class Addviewer extends Service {

    private XMLRPCClient client;
    private URI uri;
    String text="", IpAdress;

    @Override
    public void onCreate(){}

    public void onStart(Intent intent, int StartId){

         uri = URI.create("http://fuseng.elte.rma.ac.be:8080/RPC2");
          client = new XMLRPCClient(uri);

          getLocalIpAddress();

        if (!IpAdress.equals("R.A.S")){ 

          try {
            text = (String) client.call("mission.addViewer",IpAdress+ ":" + 8214, "newImage"); 
        } catch (XMLRPCException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            text= "erro in adding viewer with the exception:" + e + "/n" + "try again later";
        } 
            Toast.makeText(this,"suscribtion to the viewer with the result " + text, Toast.LENGTH_SHORT).show(); }


        else {
            Toast.makeText(this,"No network avalaible right now" + "/n" + "try again later", Toast.LENGTH_SHORT).show();

        }

    }  

    public String getLocalIpAddress() {
        try {
            for (Enumeration&lt;NetworkInterface&gt; en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
                NetworkInterface intf = en.nextElement();
                for (Enumeration&lt;InetAddress&gt; enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
                    InetAddress inetAddress = enumIpAddr.nextElement();
                    if (!inetAddress.isLoopbackAddress()) {
                        IpAdress= inetAddress.getHostAddress().toString();
                        return inetAddress.getHostAddress().toString();
                    }
                }
            }
        } catch (SocketException ex) {
            IpAdress="R.A.S";
        }
        return null;
    }

    @Override
    public IBinder onBind(Intent arg0) {
        // TODO Auto-generated method stub
        return null;
    }



}
</code></pre>

<p>so i changed the sparametr newImage by an integer (i.e 214) and then it (the service) works fine except that the server replies me that it is expecting a string at the second parameter (i was already aware of it)... please help</p>
