• 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

HTTPS COnnection from Motorola i730

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I was trying to implement HTTPS in MotorolaiDENi730 SDK/EMULATOR.
I am using JBOSS as my application server. I have enabled https in JBOSS3.2.3 and I can access through the browser https://localhost/hello/testservlet.



But when I try to access through my emulator its throwing exception

The following piece of code I have used to connect the JBoss server.

HttpsConnection hsc = null;
OutputStream os = null;
hsc = (HttpsConnection) Connector.open(conURL,Connector.READ_WRITE, true); hsc.setRequestMethod(HttpConnection.POST);
hsc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

hsc.setRequestProperty("Content-Language", "en-US" );
os = hsc.openOutputStream();
String outputString="sathish kannan";
// Write to the output stream
os.write(outputString.getBytes());
// Send data to server side
os.flush();
// close OutputStream
os.close();
// Close HTTPSConection*/
hsc.close();


Even I have tried with HttpConnection class. Still I am getting the following exception



javax/microedition/pki/CertificateException: <no message>

at com/mot/cldc/io/j2me/https/Protocol::connectSocket(Ljava/lang/String Ljavax/microedition/io/StreamConnection;+151

at com/mot/cldc/io/j2me/http/StreamConnectionPool::<private method>+302

at com/mot/cldc/io/j2me/http/StreamConnectionPool::getConnection(Lcom/mot/cldc/io/j2me/http/ConnectionBaseAdapter;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;ZZ)Lcom/mot/cldc/io/j2me/http/StreamConnectionElement;+128

at com/mot/cldc/io/j2me/http/Protocol::connect()Ljavax/microedition/io/StreamConnection;+89

at com/mot/cldc/io/j2me/http/Protocol::sendRequest(I)V+113

at com/mot/cldc/io/j2me/http/Protocol::getResponseCode()I+9

at PorticusConnection::getConnectionHTTPS(Ljava/lang/String;Ljava/lang/String [Ljava/lang/String;+44

at Porticus::genCasinosFromLBS()[Ljava/lang/String;+42

at Porticus::commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable V+250

at javax/microedition/lcdui/CommandManager::keyReleased(I)Z+181

at javax/microedition/lcdui/DisplayAccessorImpl::keyReleased(I)V+21

at javax/microedition/midlet/AppContext::handleEvent()V+100

at javax/microedition/midlet/AppContext::run()V+396









Do I have to do any other settings in the emulator.



Thanks in advance



Best Regards

-Sathish
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads 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