1
So personal I am not able to send the data via ksoap2 on android. Appears the following error:
I honestly did not understand what the problem, so I turned to the stack, because the namespace is right and the action tbm, follows the code on android:
SoapObject soapObject = new SoapObject(NAMESPACE,"inserirCoord");
PropertyInfo infoPrest = new PropertyInfo();
infoPrest.setName("idPrestador");
infoPrest.setValue(idPrestador);
infoPrest.setType(PropertyInfo.INTEGER_CLASS);
soapObject.addProperty(infoPrest);
soapObject.addProperty("latitude",latitude);
soapObject.addProperty("longitude",longitude);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.implicitTypes = true;
// envelope.encodingStyle = SoapSerializationEnvelope.XSD;
envelope.setOutputSoapObject(soapObject);
/* MarshalDouble md = new MarshalDouble();
md.register(envelope);*/
HttpTransportSE transportSE = new HttpTransportSE(transport);
try
{
transportSE.call("inserirCoord",envelope);
SoapObject resultado = (SoapObject) envelope.getResponse();
return Boolean.parseBoolean(resultado.toString());
}
catch(Exception ex)
{
erro = ex.toString();
return false;
}
it is giving error with the idPrestador, maybe it should not receive as string? or other format outside integer? It would be strange, but that’s what seems to be happening
– Shogogan
No, the data type of the idPractor in the webservice is int even.
– André Araujo
Strange, because from what he gave to understand of the error, the problem is in the idPrestador, and he is not asking for any specific class in it
– Shogogan
Really, it seems that the error is in these parameters there
– André Araujo