logo       

Re: Problem with KSOAP samples: msg#00004

java.enhydra.kxml

Subject: Re: Problem with KSOAP samples


The MIDP spec requires "commandAction()" to "return immediately". That
means you can not perform any network operation in that method. You have
to start a new thread. The kSOAP example does networking in
"commandAction()". It works under the J2ME WTK v1.0 because the above
rules are not enforced. But it will hang in WTK v2.0 emulators.

cheers
Michael
----------------------
Author of the book "Enterprise J2ME"
http://www.amazon.com/exec/obidos/ASIN/0131405306/
http://www.enterprisej2me.com/


On Tue, 5 Aug 2003, Elisabetta wrote:

> Hi,
>
> I'm new to J2ME and KSOAP, i download libraries and sample from "kSOAP
> Download section" but they doesn't work!
> I copy ksoap-midp.zip and kxml2.zip (rename in .jar) to "lib" application
> directory, i compile and run the project, and when the application send the
> request, it stop work! Ktoolbar return the warning:
>
> Warning: To avoid potential deadlock, operations that may block, such as
> networking, should be performed in a different thread than the
> commandAction() handler.
>
> I tried StockQuoteDemo and CashConv. Thanks in advance.
>
> Elisabetta Scaramuzza
>
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise