• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Palm VIIx Wireless application??

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If anybody has gotten a wireless application running on a Palm VIIx I need to talk to you.
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It worked! Thanks, Bill.
Liang
------------------
 
liang gu
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
You guys wanna see my fabulous new place? Or do you wanna look at this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic