BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 04-13-2008, 02:02 PM   #1 (permalink)
Thumbs Must Hurt
Join Date: Feb 2008
Model: 8310
Carrier: Informatico
Posts: 56
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default pass parameters ksoap web service

Please Login to Remove!

The problema is that The web service don't recognize any parameter, I don't know if the code is correct,
but the web service ever answer me " - False", How can I pass parameters to my web service correctly?

This is the code of the web service and the J2ME code:

<WebMethod()> _
Public Function Validarusuario(ByVal usuario As String, ByVal password As String) As String
Dim ConSQL As System.Data.OleDb.OleDbConnection, cmd_tmp As System.Data.OleDb.OleDbCommand
Dim sql As String
ConSQL = New System.Data.OleDb.OleDbConnection(CadenaConexion)
sql = "SELECT COUNT(*) FROM VALIDACION WHERE USUARIO = '" & usuario & "' AND PASSWORD = '" & password & "'"
cmd_tmp = New System.Data.OleDb.OleDbCommand(sql, ConSQL)
If cmd_tmp.ExecuteScalar > 0 Then Return usuario + " - True" Else Return usuario + " - False"
Catch ex As Exception
Return "False"
End Try
End Function

public void ProcesarRespuesta() {
try {
String soapAction = "";
String serviceUrl = "";
String serviceNamespace ="";

HttpTransport transport = null;
//SoapObject soap = new SoapObject(serviceNamespace, "HelloWorld");
SoapObject soap = new SoapObject(serviceNamespace, "Validarusuario");
soap.addProperty("usuario", "1");
soap.addProperty("password", "1");

transport = new HttpTransport(serviceUrl, soapAction);
transport.debug = true;
Object result =;

StringItem item = new StringItem("Resultado: ", result.toString());
} catch (Exception e) {
Old 04-13-2008, 05:15 PM   #2 (permalink)
Thumbs Must Hurt
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts

Are you trying to run this from your blackberry? You've got the IP address in your code, which is an internal network address and obviously your blackberry isn't on your internal network.

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.