BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-23-2008, 06:26 AM   #21
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Please Login to Remove!

I have the same problem.

What I don't understand is that the code work fine until last Friday.

And now no.

Has anyone got an idea???
Offline  
Old 06-23-2008, 08:15 AM   #22
greg_orille
Knows Where the Search Button Is
 
Join Date: Jun 2008
Model: 8310
PIN: N/A
Carrier: Developper
Posts: 43
Default

Is the MDS started ?
Offline  
Old 06-23-2008, 08:19 AM   #23
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Yes of course.

I'm sure that the pb comes from ksoap2
Offline  
Old 07-07-2008, 12:59 AM   #24
soumyojit
New Member
 
Join Date: Jul 2008
Location: Bangalore
Model: 8800
OS: Xp
PIN: N/A
Carrier: Vodafone
Posts: 2
Default

Can you please help me in showing how do i access web service from Blackberry JDE using KSOAP 2 .
Offline  
Old 07-07-2008, 02:05 AM   #25
soumyojit
New Member
 
Join Date: Jul 2008
Location: Bangalore
Model: 8800
OS: Xp
PIN: N/A
Carrier: Vodafone
Posts: 2
Default Request to help access web service using ksoap

Quote:
Originally Posted by itnwc View Post
hi, i got it work, the world is so wonderful, when i see the output, great!

Hi itnwc,
How did you do it? Can you please help me too ? I need to access web services from JDE using ksoap . Can you please show me how ? Can you send a sample as well ?
Offline  
Old 07-07-2008, 02:48 AM   #26
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Code:
//I create the transport
transport = new HttpTransport("UrlWS");
transport.debug = true;

//Object I want to send                
SoapObject myObject = new SoapObject("namespace", "name");
myObject.addProperty("double",new SoapPrimitive( "http://www.w3.org/2001/XMLSchema","double","3.16542)));
myObject.addProperty("string", "test"));

//Envelope for serialization
SoapSerializationEnvelope envelope = new  SoapSerializationEnvelope(SoapEnvelope.VER11);

//Add the object to the enveloppe               
envelope.setOutputSoapObject(myObject);         

//Execute the transport with the envelope                
transport.call("fonction",envelope);

//Recover the response
Object obj = envelope.getResponse();
Hope it's helpfull

Last edited by goulamass; 07-07-2008 at 02:51 AM..
Offline  
Old 10-21-2008, 10:52 PM   #27
jcsa
New Member
 
Join Date: Oct 2008
Model: 9000
PIN: N/A
Carrier: Claro
Posts: 4
Exclamation impossible to connect to web service using ksoap and jsr 172

Hello everybody!

I am using Netbeans 6.1 IDE with JDE 4.6 platform integrated. I have developed a J2ME MIDP application to connect to web service using jsr 172 specification and i had success. The same success using ksoap 1.2. In those cases using Sun Java Wireless Toolkit simulator.

The problem is when I try the same application in BlackBerry 9000 Bold simulator. I obviously changed the code.

It never connect to web service neither using jsr 172 or ksoap.

The exception in both cases is: "Local connection timed out after ~ 120000"

Somebody have any idea what is happend?. Did I forget do any else configuration?

thanks in advance

jcsa
Offline  
Old 10-21-2008, 11:52 PM   #28
PymbleSoftware
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: 7100T
PIN: N/A
Carrier: internal
Posts: 15
Default

Quote:
Originally Posted by jcsa View Post
Hello everybody!

I am using Netbeans 6.1 IDE with JDE 4.6 platform integrated. I have developed a J2ME MIDP application to connect to web service using jsr 172 specification and i had success. The same success using ksoap 1.2. In those cases using Sun Java Wireless Toolkit simulator.

The problem is when I try the same application in BlackBerry 9000 Bold simulator. I obviously changed the code.

It never connect to web service neither using jsr 172 or ksoap.

The exception in both cases is: "Local connection timed out after ~ 120000"

Somebody have any idea what is happend?. Did I forget do any else configuration?

thanks in advance

jcsa

Check the connectivity, if simulator you are using has a browser try to load one of your favourite web pages like your local newspaper.

With kSoap I get "Local connection timed out after ~ 120000" from network problems or incorrect URLs.

The simulator I use has no internet connectivity (and I could not get the MDS Studio to work) so I debug on the actual Blackberry.


RR.
__________________
www.pymblesoftware.com
P.O. Box 121,
Pymble,
NSW 2073
AUSTRALIA. +61 2 99830308
Offline  
Old 10-22-2008, 09:33 AM   #29
sickned
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: 7100T
PIN: N/A
Carrier: Unknow
Posts: 42
Default

http://www.blackberryforums.com/deve...-tutorial.html
Offline  
Old 10-22-2008, 09:35 AM   #30
sickned
Knows Where the Search Button Is
 
Join Date: Oct 2008
Model: 7100T
PIN: N/A
Carrier: Unknow
Posts: 42
Default

repeat post.
Offline  
Old 10-23-2008, 11:06 PM   #31
jcsa
New Member
 
Join Date: Oct 2008
Model: 9000
PIN: N/A
Carrier: Claro
Posts: 4
Exclamation

to RR or everybody,
I see the connections available in my simulator: mobile network and wi-fi, and those are simulated like "In coverage". Anyway I cotinue having the same exception "Local connection timed out after ~ 120000". in my blackberry application. I post my code. Please somebody to give me an advice.
===========================================
package org.ts.sl.wsclient;

import java.io.IOException;
import java.util.Date;

import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.EditField;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.Menu;
import net.rim.device.api.ui.container.MainScreen;

import org.ksoap.ClassMap;
import org.ksoap.SoapObject;
import org.ksoap.transport.HttpTransport;

import org.ts.sl.entity.SystemAlert;

/**
* @author jcsa
*/
public class AlertClient extends UiApplication {

public static void main(String[] args){
AlertClient app = new AlertClient();
app.enterEventDispatcher();
}

public AlertClient(){
pushScreen(new MainInfoScreen());
doSoap();
}

final class MainInfoScreen extends MainScreen{

public MainInfoScreen(){
super();
LabelField titulo = new LabelField("Prueba de cliente WS en BlackBerry"
,LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(titulo);
EditField ef = new EditField("Aler: ", "");

}

public boolean onClose(){
Dialog.alert("Bye!!");
System.exit(0);
return true;
}

private MenuItem _closeItem = new MenuItem("Cerrar aplicacion", 200000, 10){
public void run() {
onClose();
}
};

//sobreescribir makeMenu
protected void makeMenu(Menu menu, int instance){
menu.add(_closeItem);
}

}

public void doSoap(){
try{
String serviceUrl = "h t t p : / / localhost : 8085 / kSoapWS / AlertServlet";
ClassMap classMap = new ClassMap();
classMap.addMapping("org.teamsoft.sicel.entidad", "SystemAlert", new SystemAlert().getClass() );
SoapObject request = new SoapObject("urn : xmethods-AlertService", "getNextSystemAlert" );

HttpTransport tx = new HttpTransport(serviceUrl + "?service=AlertService", "urn : xmethods-AlertService");
tx.setClassMap( classMap );
tx.debug = true;

SystemAlert nextAlert = (SystemAlert) tx.call(request);
System.out.println( tx.responseDump );
System.out.println(nextAlert.getMessage() + " \nat " + new Date(nextAlert.getTimeStamp()));

}catch(IOException ioe){
ioe.printStackTrace();
}
}
}
===========================================

The data Class:
===========================================
package org.ts.sl.entity;

import org.kobjects.serialization.PropertyInfo;
import org.kobjects.serialization.ElementType;


public class SystemAlert implements org.kobjects.serialization.KvmSerializable {

private long timeStamp = -1;
private String message = null;

/*
* Used by KSOAP Implementation methods
*/
private static int PROP_COUNT = 2;
private static PropertyInfo PI_timeStamp = new PropertyInfo("timeStamp",ElementType.LONG_CLASS);
private static PropertyInfo PI_message = new PropertyInfo("message",ElementType.STRING_CLASS);
private static PropertyInfo[] PI_PROP_ARRAY = {PI_timeStamp,PI_message};

public SystemAlert() {
}

public java.lang.String getMessage() {
return message;
}

public void setMessage(java.lang.String message) {
this.message = message;
}

public long getTimeStamp() {
return timeStamp;
}

public void setTimeStamp(long timeStamp) {
this.timeStamp = timeStamp;
}

/*
* Implementation Logic for KSOAP
*/
public Object getProperty(int param) {
if ( param == 0 ) {
return new Long(getTimeStamp());
} else if ( param == 1 ) {
return getMessage();
} else {
return null;
}
}

public void setProperty(int param, Object obj) {
if ( param == 0 ) {
long l = ((Long) obj).longValue();
setTimeStamp( l );
} else if ( param == 1 ) {
setMessage( (String) obj );
} else {

}
}

public int getPropertyCount() {
return PI_PROP_ARRAY.length;
}

public void getPropertyInfo(int param, org.kobjects.serialization.PropertyInfo propertyInfo) {
propertyInfo.name = PI_PROP_ARRAY[param].name;
propertyInfo.nonpermanent = PI_PROP_ARRAY[param].nonpermanent;
propertyInfo.copy(PI_PROP_ARRAY[param]);
}
}
===========================================

This code in a MIDLET version had success, but in BlackBerry dont.
Any idea?

Thanks in advance!

jcsa
Offline  
Old 10-24-2008, 02:58 AM   #32
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Is your MDS running???

Because the error you got means that the simulator is waiting for a connexion.

To check a web connexion try to navigate on the web with your simulator
Offline  
Old 11-24-2008, 04:54 AM   #33
ajay_kumar
New Member
 
Join Date: Nov 2008
Model: Storm
PIN: N/A
Carrier: Vodafone
Posts: 14
Default Parsing Exception

hi frndz

i am parsing my xml file by kxml package.
it is working fine in j2me but with BB it throws exception
"unexpected parseevent type=128
text=not authorized to access localhost:80@ -1:1"


please help me to solve this problem
Offline  
Old 11-24-2008, 06:40 AM   #34
baran_khan
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Default

Quote:
Originally Posted by ajay_kumar View Post
hi frndz

i am parsing my xml file by kxml package.
it is working fine in j2me but with BB it throws exception
"unexpected parseevent type=128
text=not authorized to access localhost:80@ -1:1"


please help me to solve this problem
Hello Ajay,

You might find it strange, but try replacing the localhost with the current IP you have of ur sytem. I am sure that won't be 127.0.0.1 as you are connected to network, try it, it worked for me while communicating with a web service once.
__________________
Smart People ask for Help!!!
Offline  
Old 12-15-2008, 05:39 AM   #35
mithleshdwivedi
New Member
 
Join Date: Dec 2008
Model: 7100T
PIN: N/A
Carrier: nothing
Posts: 14
Default request

sir will u do me a favour i m also struggling with blackberry JDE with eclips and wants to use ksoap bt donn't know how to use iit ...
could u tell me the nessecessay steps ..ie compltee details of the steps .

thanks in advance

mithlesh dwivedi
Offline  
Old 12-17-2008, 06:51 AM   #36
mithleshdwivedi
New Member
 
Join Date: Dec 2008
Model: 7100T
PIN: N/A
Carrier: nothing
Posts: 14
Question struggling with same problem budy

}
================================================
my output is
i am here 1
i am here 2
i am here in catch
No stack trace
Can anyone solve thsi ...plz
Offline  
Old 12-17-2008, 07:00 AM   #37
baran_khan
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Default

where is the code...i can't see anything
__________________
Smart People ask for Help!!!
Offline  
Old 12-17-2008, 07:00 AM   #38
mithleshdwivedi
New Member
 
Join Date: Dec 2008
Model: 7100T
PIN: N/A
Carrier: nothing
Posts: 14
Post error comming----

HttpTransport ht = new HttpTransport ("url");
ht.debug = true;
System.out.println("i am here 2");
ht.call("test/HelloWorld",envelope);
System.out.println("i am here 3");
System.out.println("ok:" + envelope.toString());
System.out.println("Result of BB:" + envelope.getResult());

}

catch (Exception e)
{
System.out.println("i am here in catch");
e.printStackTrace ();

}
}
}
================================================
my output is

i am here 1
i am here 2


i am here in catch
No stack trace

what should do.plz reply the answer.thanks in advance
Offline  
Old 12-17-2008, 07:02 AM   #39
mithleshdwivedi
New Member
 
Join Date: Dec 2008
Model: 7100T
PIN: N/A
Carrier: nothing
Posts: 14
Default

after call it goes to catch and
same exception is thrown
"No stack trace "

wht can i do ....


thanks
mithlesh dwivedi
Offline  
Old 12-17-2008, 07:06 AM   #40
baran_khan
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Default

Quote:
Originally Posted by mithleshdwivedi View Post
HttpTransport ht = new HttpTransport ("url");
ht.debug = true;
System.out.println("i am here 2");
ht.call("test/HelloWorld",envelope);
System.out.println("i am here 3");
System.out.println("ok:" + envelope.toString());
System.out.println("Result of BB:" + envelope.getResult());

}

catch (Exception e)
{
System.out.println("i am here in catch");
e.printStackTrace ();

}
}
}
================================================
my output is

i am here 1
i am here 2


i am here in catch
No stack trace

what should do.plz reply the answer.thanks in advance

ht.call("test/HelloWorld",envelope);

Please verify your soapAction
__________________
Smart People ask for Help!!!
Offline  
Closed Thread



Posting Rules
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
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet  picture

OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet

$2.99



iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M picture

iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M

$4.99



3M/10 feet Long Apple iPhone 13 12 11 Pro XS MAX XR X 8 Fast Charging Data Cable picture

3M/10 feet Long Apple iPhone 13 12 11 Pro XS MAX XR X 8 Fast Charging Data Cable

$3.50



10 Foot/3M iPhone 12/11 PRO MAX X/10 XR XS 8/7 FAST Charging USB LONG Cable cord picture

10 Foot/3M iPhone 12/11 PRO MAX X/10 XR XS 8/7 FAST Charging USB LONG Cable cord

$4.98



Welch Allyn Standard (bulb) MAC 2 Laryngoscope Blade #69042 New in OEM Box picture

Welch Allyn Standard (bulb) MAC 2 Laryngoscope Blade #69042 New in OEM Box

$19.77



18 x Sunmed Macintosh Standard (Lamp) Laryngoscope Blades, Size 2, OEM ~17016 picture

18 x Sunmed Macintosh Standard (Lamp) Laryngoscope Blades, Size 2, OEM ~17016

$129.99







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