Android - org.ksoap2.type soapfault ne peut pas être lancé

J'essaye d'accéder à un Service Web Java à partir d'Android client, mais il m'indique une erreur:

"de java.lang.classcastexception org.ksoap2.type soapfault ne peut pas être lancé pour org.ksoap2.la sérialisation.soapobject"

Pouvez-vous m'aider?

Voici mon client de service web code:

import java.lang.reflect.Method;
import android.app.Activity; 
import android.os.Bundle; 
import android.content.Context;
import android.content.Intent; 
import android.view.Menu; 
import android.view.MenuItem; 
import android.view.View;
import android.view.Window;
import android.widget.EditText;
import android.widget.TextView;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import org.ksoap2.transport.HttpTransportSE; 
public class Loginuser extends Activity{
public static final int MENU1 = Menu.FIRST; 
public static final int MENU2 = Menu.FIRST + 1; 
public static final int MENU3 = Menu.FIRST + 2; 
public static Context group;
private static final String SOAP_ACTION = "";
private static final String METHOD_NAME = "logar";
private static final String NAMESPACE = "http://wsproj.mycompany.com/";
private static final String URL = "http://localhost:8084/wsproj/HelloWorld";
EditText ura,pw; 
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE); 
setContentView(R.layout.loginuser);
}
public void logar(View X) { 
CarregaTelaBolarq();
}
public void CarregaTelaBolarq(){
ura=(EditText)findViewById(R.id.editText2);
String raforn = ura.getText().toString();
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("raforn",ura.getText().toString());
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
try{
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject sp = (SoapObject)envelope.bodyIn;
String result=sp.toString();
if(result.equals("1"))
{
TextView tv; 
tv=(TextView) findViewById(R.id.editText1);
tv.setText("foi: ");
}
else
{
TextView tv; 
tv=(TextView) findViewById(R.id.editText1);
tv.setText("Msg from service: ");
}       
}
catch(Exception e)
{
TextView tv=(TextView) findViewById(R.id.editText1);
tv.setText("ERROR: " + e.toString());
}
}
public boolean onCreateOptionsMenu(Menu options) { 
options.add(0, MENU1, 0, "Página Principal");
options.add(0, MENU2, 0, "Manual");
options.add(0, MENU3, 0, "Sobre");
return super.onCreateOptionsMenu(options);   }
public boolean onOptionsItemSelected(MenuItem item) {   
switch (item.getItemId()) { 
case MENU1: 
Intent mudarHome= new Intent(this, MainActivity.class); 
startActivity(mudarHome);  
return true;
case MENU2: 
Intent mudarManual = new Intent(this, Manual.class); 
startActivity(mudarManual); 
return true;
case MENU3: 
Intent mudarSobre = new Intent(this, Sobre.class); 
startActivity(mudarSobre);  
return true;
}   
return false;   
}
}
À ce que la ligne est l'exception qui se passe? Vous pouvez le trouver en cours d'exécution de votre application dans le débogueur et en regardant les détails de l'exception.
Lorsque j'essaie d'exécuter le débogueur lorsque l'application s'ouvre m'indique "en Attente d'un débogueur de Forcer la fermeture".

OriginalL'auteur JulToldo | 2012-10-28