BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-22-2004, 09:25 AM   #1
callaway
Knows Where the Search Button Is
 
Join Date: Sep 2004
Model: 8300
Carrier: T-Mobile
Posts: 24
Default

Please Login to Remove!

Offline  
Old 11-22-2004, 09:45 AM   #2
Sdevitt
Knows Where the Search Button Is
 
Join Date: Jan 2005
Location: Dallas, Tx
Posts: 17
Default

Offline  
Old 11-22-2004, 10:54 AM   #3
NJBlackBerry
Grumpy Moderator
 
NJBlackBerry's Avatar
 
Join Date: Aug 2004
Location: Somewhere in the swamps of Jersey
Model: SGS7
Carrier: Verizon
Posts: 27,948
Default

Offline  
Old 11-22-2004, 01:36 PM   #4
arconsulting
Thumbs Must Hurt
 
Join Date: Aug 2004
Location: Metro NYC
Posts: 175
Default

__________________
-- Aric Rosenbaum
BlackBerry consulting, BlackBerry development
www.arconsultinginc.com
BlackBerry consulting and development (RIM SI Partner)
Offline  
Old 01-16-2005, 12:22 PM   #5
Emdis
New Member
 
Join Date: Oct 2004
Location: Montpellier
Posts: 5
Default What's wrong with my java code ??

Hi All,

I'm trying to write a java program that connects to a webservice server and retrieve some information (this is a very basic program for the moment) but unfortunaltely I'm already stuck. My program works fine with the emulator but freezes on my handheld (even if my code is launch in a thread).

I would really appreciate that someone look at my thread code to give me a clue because I'm really stuck
Here is my code:

Code:
 private class ConnectionThread extends Thread
    xxx123;
        private static final int TIMEOUT = 500; //ms

        private String _theUrl;

        private volatile boolean _start = false;
        private volatile boolean _stop = false;

        public void essaixxx40;xxx41;
        xxx123;
            if xxx40; _start xxx41;
            xxx123;
                Dialog.alertxxx40;_resources.getStringxxx40;HTTPDEMO_ALERT_REQUESTINPROGRESSxxx41;xxx41;;
            xxx125;
            else
            xxx123;
                synchronizedxxx40;thisxxx41;
                xxx123;
                    if xxx40; _start xxx41;
                    xxx123;
                        Dialog.alertxxx40;_resources.getStringxxx40;HTTPDEMO_ALERT_REQUESTINPROGRESSxxx41;xxx41;;
                    xxx125;
                    else
                    xxx123;
                        _start = true;
                    xxx125;
                xxx125;
            xxx125;
        xxx125;

        //shutdown the thread
        public void stopxxx40;xxx41;
        xxx123;
            _stop = true;
        xxx125;

        public void runxxx40;xxx41;
        xxx123;
            forxxx40;;;xxx41;
            xxx123;
                //Thread control
                whilexxx40; !_start && !_stopxxx41;
                xxx123;
                    //sleep for a bit so we don't spin
                    try 
                    xxx123;
                        sleepxxx40;TIMEOUTxxx41;;
                    xxx125; 
                    catch xxx40;InterruptedException exxx41;
                    xxx123;
                        System.err.printlnxxx40;e.toStringxxx40;xxx41;xxx41;;
                    xxx125;
                xxx125;
                //exit condition
                if xxx40; _stop xxx41;
                xxx123;
                    return;
                xxx125;
   
                synchronizedxxx40;thisxxx41;
                xxx123;
                    try 
                    xxx123;
                        Call call = new Callxxx40;xxx41;;
                                                
                        call.addParameterxxx40;"example", pxxx41;;
                        call.setMethodNamexxx40;"list"xxx41;;
                        call.setTargetObjectURIxxx40;"urnxxx58;try"xxx41;; 
                        
                        HTTPTransport transport = new HTTPTransport xxx40;"httpxxx58;//www.myfirm.comxxx58;90/soap/servlet/rpcrouter","urnxxx58;try"xxx41;;
                        transport.getResponsexxx40;truexxx41;;
                        Envelope responseEnvelope = call.invokexxx40;transportxxx41;;
                    
                        Stringxxx91;xxx93; results = new Stringxxx91;4xxx93;;
                        Object hhxxx91;xxx93;;
                        hh = xxx40;Objectxxx91;xxx93;xxx41; responseEnvelope.getParameterxxx40;0xxx41;;
                                            
                        stopStatusThreadxxx40;xxx41;;
                        
                         _statusThread.stopxxx40;xxx41;;
                         _connectionThread.stopxxx40;xxx41;;
                    xxx125; 
                    catch xxx40;Exception exxx41; 
                    xxx123;
                        System.err.printlnxxx40;e.toStringxxx40;xxx41;xxx41;;
                        stopStatusThreadxxx40;xxx41;;
                    xxx125;
                    //we're done one connection so reset the start state
                    _start = false;
                xxx125;
            xxx125;
        xxx125;
The handheld freezes on this line:
Code:
Envelope responseEnvelope = call.invokexxx40;transportxxx41;;
By the way I'm using the wingfoot soap class.

Please help me
Thanks in advance

Emdis
Offline  
Old 01-22-2005, 10:15 AM   #6
arconsulting
Thumbs Must Hurt
 
Join Date: Aug 2004
Location: Metro NYC
Posts: 175
Default

What does the code look like that instantiates the thread?

Does the Dialog.alert() get called? This could be a source of your problem.
__________________
-- Aric Rosenbaum
BlackBerry consulting, BlackBerry development
www.arconsultinginc.com
BlackBerry consulting and development (RIM SI Partner)
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


Schneider Electric Energy Server EBX510 Server For Energy Management- picture

Schneider Electric Energy Server EBX510 Server For Energy Management-

$4350.00



FANUC Server Driver A06B-6077-H111 picture

FANUC Server Driver A06B-6077-H111

$2158.86



FANUC Server Driver A06B-6117-H211 picture

FANUC Server Driver A06B-6117-H211

$3993.99



SERVER TECHNOLOGY 4870-XLS-44 SENTRY VDC 48VOLT DC REMOTE POWER MANAGER picture

SERVER TECHNOLOGY 4870-XLS-44 SENTRY VDC 48VOLT DC REMOTE POWER MANAGER

$299.99



NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0 picture

NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0

$179.99



Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM picture

Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM

$180.00







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