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

Respuesta
 
Herramientas
  #1  
Viejo 04/07/13, 19:12:59
Array

[xs_avatar]
Franco.Mori Franco.Mori no está en línea
Usuario novato en la web
 
Fecha de registro: jul 2013
Mensajes: 1
Tu operador: Movistar

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   Portal | Indice > Todo sobre Android > Programación y Desarrollo para Android



Hora actual: 09:57:03 (GMT +1)



User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.

Contactar por correo / Contact by mail / 邮件联系 /