I have to send NameValuePair
list to server using Soap webservice from my android app.
I am getting error 04-03 11:09:51.693: E/Error in Catch(14070): java.lang.RuntimeException: Cannot serialize
. Please help me. Below is my Code
List<NameValuePair >Array = new ArrayList<NameValuePair>();
Array .add(new BasicNameValuePair("first_name", firstName));
Array .add(new BasicNameValuePair("last_name", lastName));
Array .add(new BasicNameValuePair("address", address);
Array .add(new BasicNameValuePair("city", city));
Array .add(new BasicNameValuePair("state", state));
protected String doInBackground(List<NameValuePair>... params) {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("array", Array );
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
envelope.implicitTypes = true;
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
Log.e("Soap Object Output", String.valueOf(result));
} catch (Exception e) {
e.printStackTrace();
Log.e("Error in Catch", e.toString());
}
return null;
}