Lokesh454 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

Error calling SOAP. #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When i call HttpTransportSE.call method the error message shows CANNOT 
SERIALIZE. in the fist property.

this is my code

private static final String Metodo = "RecibeDatos";
private static final String namespace = "http://tempuri.org/";
private static final String accionSoap = "http://tempuri.org/RecibeDatos";
private static final String url = 
"http://67.231.108.172:1080/ServRecepcion.asmx";

private int IDMovil=1;

public void EnviarMensaje(double latitud, double longitud)
    {
        Calendar cal = new GregorianCalendar();
        Date Fecha = cal.getTime();     

        SoapObject request = new SoapObject(namespace, Metodo);

    PropertyInfo FahrenheitProp = new PropertyInfo();        
    FahrenheitProp.setName("dlat");
        FahrenheitProp.setValue(latitud);
        FahrenheitProp.setType(PropertyInfo.LONG_CLASS);
        request.addProperty(FahrenheitProp);

        FahrenheitProp = new PropertyInfo();        
    FahrenheitProp.setName("dlong");
        FahrenheitProp.setValue(longitud);
        FahrenheitProp.setType(PropertyInfo.LONG_CLASS);
        //FahrenheitProp.setType(double.class);
        request.addProperty(FahrenheitProp);

        FahrenheitProp = new PropertyInfo();        
    FahrenheitProp.setName("iID");
        FahrenheitProp.setValue(IDMovil);
        FahrenheitProp.setType(PropertyInfo.INTEGER_CLASS);
        //FahrenheitProp.setType(int.class);
        request.addProperty(FahrenheitProp);

        FahrenheitProp = new PropertyInfo();        
    FahrenheitProp.setName("Fecha");
        FahrenheitProp.setValue(Fecha);
        FahrenheitProp.setType(Date.class);
        request.addProperty(FahrenheitProp);*/

        SoapSerializationEnvelope sobre = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        sobre.dotNet = true;
        sobre.implicitTypes = true;

        sobre.setOutputSoapObject(request);

        HttpTransportSE transporte = new HttpTransportSE(url);
        try
        {
        // Llamada
            transporte.debug = true;

            transporte.call(accionSoap, sobre);

                sobre.getResponse();
            sobre.getResponse().toString();
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }

}

how can i Fix this?.

Original issue reported on code.google.com by radaalv...@singleton.com.bo on 6 Jan 2014 at 5:12

GoogleCodeExporter commented 9 years ago
Read the documentation.. 

Original comment by mosa...@gmail.com on 29 Jan 2014 at 6:15