BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 04-13-2008, 03: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, 06: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.
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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