wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes Palm VIIx Wireless application?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Palm VIIx Wireless application??" Watch "Palm VIIx Wireless application??" New topic
Author

Palm VIIx Wireless application??

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
If anybody has gotten a wireless application running on a Palm VIIx I need to talk to you.
liang gu
Ranch Hand

Joined: Nov 05, 2001
Posts: 89
I am having the same problem. What I am trying to do now is: I have a J2ME wireless application that works on the Palm VII simulator but does NOT work on the Palm VIIx actual device. The palm is activated with Palm.net service and the application basically is just to open a connection to a HTTP server. I have the code in the following:
...............
try {
String url = "http://quote.yahoo.com/d";
Connector.openDataInputStream(url);
} catch (Exception e ) {
t = new TextBox ("Error", e.toString(), 1024,0);
}
.............
Everything works on the simulator, but on the actual device I got IllegalArgumentException.
I am so desperate on this and I will be extremely appreciated if you can give me any kind of help.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12784
    
    5
I have found out that the VIIx seems to be a special case because of the built-in wireless (as opposed to Palms with add-on modems). In the MIDP for Palm OS version 1.0FCS (Oct 2001) documentation (dev.pdf) it is remarked that palm.net uses a different library to create a HTTP so you have to create a connection using something like:
"inethttp://www.yahoo.com/"
instead of
"http://www.yahoo.com/"
Please let me know if this works for you.
However I have still not been able to send and receive SOAP messages over HTTP.
Bill
liang gu
Ranch Hand

Joined: Nov 05, 2001
Posts: 89
It worked! Thanks, Bill.
Liang
------------------
liang gu
Ranch Hand

Joined: Nov 05, 2001
Posts: 89
It worked, however, the connection speed is painfully slow. It takes about 1 min. to send and receive 300 charactors on the Palm VIIx device. As for comparisons, it only takes few seconds on the simulator(connected through LAN/WAN) for the same application. And for other defaultly installed non-J2ME wireless applications on the Palm VIIx device, e.x., ABC News, Amazon, etc., it also only takes few seconds to retrieve 500~600 characters.
Does anybody know why the J2ME wireless communication on Palm VIIx device is so slow? Any solutions?
My code is like in the following:
private String getWirelessQueryResult(String urlStr) {
StringBuffer sb = new StringBuffer();
InputStream is = null;
StreamConnection c = null;
try {
c = (StreamConnection)connector.open
(urlStr,Connector.READ_WRITE);
is = c.openInputStream();
int ch;
while((ch = is.read()) != -1) {
sb.append((char)ch);
}
} catch (IOException e) { sb = new StringBuffer("error"); }
finally {
try
{
if(is != null) { is.close(); }
if(c != null) { c.close();}
}
catch (IOException e) {}
}
return sb.toString();
}
I have also tried to read the data at once instead of one character by one character. However, it doesn't work because inethttp protocal can't retrieve content-length.

Originally posted by liang gu:
It worked! Thanks, Bill.
Liang

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Palm VIIx Wireless application??