Home Menu

Menu



Programación y Desarrollo para Android Subforo exclusivo para temas de programación de software para PDAs y desarrollo de aplicaciones, interfaces, etc bajo Android


 
Herramientas
  #1  
Viejo 04/07/13, 19:12:59
Avatar de Franco.Mori
Franco.Mori Franco.Mori no está en línea
Usuario novato en la web
Mensajes: 1
 
Fecha de registro: jul 2013
Mensajes: 1
Tu operador: Movistar
Mencionado: 0 comentarios
Tagged: 0 hilos
triste Error al enviar variables a WebService .NET

Hola , espero me puedan ayudar , tengo un problema al enviar parametros a un WebService .NET , este es mi codigo de envío (Java)
(Click para mostrar/ocultar)
public String registrocliente(String nombre, String apellido, String dni,
String telefono, String email, String ciudad, String pais,
String direccion, String fechanacimiento) {
try {
SoapObject request = new SoapObject(namespace, method);
request.addProperty("nombre", nombre);
request.addProperty("apellido", apellido);
request.addProperty("dni", dni);
request.addProperty("telefono", telefono);
request.addProperty("email", email);
request.addProperty("ciudad", ciudad);
request.addProperty("pais", pais);
request.addProperty("direccion", direccion);
request.addProperty("fechanacimiento", fechanacimiento);
request.addProperty("username", username_r);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE transport = new HttpTransportSE(url);
transport.call(soapaction, envelope);
SoapPrimitive result = (SoapPrimitive) envelope.getResponse();
return result.toString();
} catch (Exception e) {
return e.getMessage();
}
}

(Click para mostrar/ocultar)

String r = obj.registrocliente(txtnom.getText().toString(),
txtape.getText().toString(), txtdni.getText()
.toString(), txttel.getText().toString(),
txtemail.getText().toString(), txtciudad.getText()
.toString(), txtpais.getText().toString(),
txtdir.getText().toString(), txtfecnac.getText()
.toString());
if (r.equals("true")) {
Toast msg = Toast.makeText(getApplicationContext(),
"Registrado correctamente", Toast.LENGTH_LONG);
msg.show();
}

El error que resulta, es que al momento de enviar estos parametros , me salta un mensaje indicando que "Ocurrio un error inesperado y la aplicación se cerrará";
espero me puedan ayudar
Responder Con Cita


Respuesta

Estás aquí
Regresar   HTCMania > Todo sobre Android > Programación y Desarrollo para Android


Reglas de Mensajes
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Las caritas están On
Código [IMG] está On
Código HTML está Off

Saltar a Foro



Hora actual: 08:06:02 (GMT +1)

Cookies
Powered by vBulletin™
Copyright © vBulletin Solutions, Inc. All rights reserved.
 
HTCMania: líderes desde el 2007