Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Procedure 'login' not present' faultactor: 'null' detail: null

The above exception will occur when try to call the localhost webservice in android.
my class file is :

public class MainActivity extends Activity {
String str = null;

SoapObject request;
TextView tv;

@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

tv = (TextView) findViewById(R.id.textView1);
myasynctask MAT = new myasynctask();
MAT.execute();
}


class myasynctask extends AsyncTask<String, Void, String> {

String str;
private static final String SOAP_ACTION = "http://www.processmaker.com/login";
private static final String METHOD_NAME = "login";
private static final String NAMESPACE = "http://www.processmaker.com/";
private static final String URL = "http://10.0.2.2:80/sysworkflow/en/classic/services/soap2";

@Override
protected String doInBackground(String... params) {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("userid", "admin");
request.addProperty("password", "admin");

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);

HttpTransportSE ht = new HttpTransportSE(URL);

try {
ht.call(SOAP_ACTION, envelope);
final SoapPrimitive response = (SoapPrimitive) envelope
.getResponse();
str = response.toString();

} catch (Exception e) {
e.printStackTrace();

}
//Log.d("WebRespone", str);
return str;
}


@Override
public void onPostExecute(String result) {
// TODO Auto-generated method stub
Toast.makeText(MainActivity.this, result, Toast.LENGTH_LONG).show();
tv.setText(result);
super.onPostExecute(result);
}

@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
}

}
}
Posted
Updated 23-Oct-13 0:03am
v2

1 solution

Basically Faultcode: 'SOAP-ENV:Server' indicates there is a problem with the server so that the message can not proceed.
Check these links which may help you:
Error Handling with SOAP Faults[^]
SOAP Fault Element[^]
How to send a soap request in android?[^]
 
Share this answer
 
Comments
Aravinth A 28-Sep-13 8:29am    
@RIDOY i already go through that link but not useful for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900