2 Replies Latest reply: Dec 15, 2009 11:58 PM by 843849 RSS

    Problem with sending sms - Scheme not found: sms

    843849
      Hello all,

      I am developing an SMS application for PDA with Windows Mobile OS and the application is to be run within IBM J9 Personal Profile 1.1. I have put application jar at \J9\PPRO11\examples\SMS.jar. I used the following code for sending SMS.
      try 
      {
        String addr = "sms://+919999999999";
        MessageConnection conn = (MessageConnection)Connector.open(addr);
        TextMessage msg = (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
        msg.setPayloadText(messageTxt.getText());
        conn.send(msg);
      } 
      catch (Exception exception) 
      {
        System.out.println("exception="+exception);
      }
      I have placed libray files wma11.jar and cldcapi11.jar at \J9\PPRO11\lib\jclFoundation11\ext and link file goes like this.
      255#"\J9\PPRO11\bin\j9w.exe" "-tofile:\Logs\error.log" "-jcl:ppro11" "-cp" "\J9\PPRO11\examples\SMS.jar" "org.Main"
      On execution I am getting an error like this.
      exception=javax.microedition.io.ConnectionNotFoundException: Scheme not found: sms
      What could be wrong? The forum at http://fixunix.com/websphere/218127-we-have-problem-sms-sending.html says that sms protocol isn't supported by default. How can I get or develop a handler class for sms connection. Anybody please help.

      Thanks.
      Reethu