We have problem with sms sending - Websphere

This is a discussion on We have problem with sms sending - Websphere ; In WSDD 5.6.1 we create MIDP application that must send sms to specified phone number with specified message text. To include WMA classes we use class library wma20.jar (supplied with WTK 2.2) We install our application on communicator (PDA+phone), invoke ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: We have problem with sms sending

  1. We have problem with sms sending

    In WSDD 5.6.1 we create MIDP application that must send sms to specified
    phone number with specified message text.
    To include WMA classes we use class library wma20.jar (supplied with WTK
    2.2)
    We install our application on communicator (PDA+phone), invoke it and have
    not result.
    This is our application source code:
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Form;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeExcepti on;
    import javax.microedition.io.*;
    import javax.wireless.messaging.*;

    public class SMS_test extends MIDlet {

    protected Form form;

    protected void startApp() throws MIDletStateChangeException {
    Display d = Display.getDisplay(this);
    d.setCurrent(getForm());

    MessageConnection conn = null;
    String url = "sms://+79030024317";

    try {
    conn = (MessageConnection) Connector.open( url );
    conn.send(conn.newMessage("Hi"));
    }
    catch( Exception e ){
    System.out.println(e.getMessage());
    }
    finally {
    if( conn != null ){
    try { conn.close(); } catch( Exception e
    ){}
    }
    }

    }
    protected void pauseApp() {
    }

    /**
    * @see MIDlet#destroyApp(boolean)
    */
    protected void destroyApp(boolean flag) throws
    MIDletStateChangeException {
    }

    protected Form getForm() {
    if (form == null) {
    form = new Form("Title");

    }
    return form;
    }
    }

    Why don't send sms? Any suggestions?

    P.S.: Sorry for bad English


  2. Re: We have problem with sms sending

    aryazanov@digemp.ru wrote:
    > In WSDD 5.6.1 we create MIDP application that must send sms to specified
    > phone number with specified message text.
    > To include WMA classes we use class library wma20.jar (supplied with WTK
    > 2.2)
    > We install our application on communicator (PDA+phone), invoke it and have
    > not result.


    Just looking at the implementation of
    javax.microedition.io.Connector.open() and findConnectionClass(), it
    appears that the sms: protocol isn't supported by default.

    If there's a different connector class provided by wma20.jar, you could
    add it by setting the property "microedition.connection.pkgs".

    For instance if wma20.jar contains the class foo.bar.sms.Connection, you
    could set the system property "microedition.connection.pkgs" to "foo.bar"

    Then foo.bar.sms.Connection will be found as a handler for the sms:
    connection protocol. However, if you don't have an additional library
    that provides an sms.Connection class, this won't work.

    Hope this helps!

    Andrew Jr.

    ================================================== ====================
    IBM Phoenix Labs (OTI)
    2929 North Central Avenue
    Phoenix, Arizona, USA 85012

  3. Re: We have problem with sms sending

    To include wma20.jar in project I do following:

    On the Package Explorer panel select my project, then Properties - Java
    Build Path -Libraries - Add External JARs, and specify wma20.jar
    Then, Run… - MIDlet Suite - SMS_test, specify wma20.jar in Classpath
    menu: Bootstrap classes - Add External JARs
    Press Run
    When launched, get error:
    --------------------
    Jxelink warnings
    Warnings were generated during jxelink build phase

    Reason:
    IVEL0016(W) In method SMS_test/startApp()V, referenced class
    javax.wireless.messaging.MessageConnection not found.
    --------------------

    Although MessageConnection() is included in the wma20.jar, but warning is
    issued. What is incorrect?

  4. Re: We have problem with sms sending

    We also get Console message:
    "Scheme not found: sms"

    What is "scheme" ?

  5. The problem is solved

    Thanks to all. The problem is solved. SMS from mobile phone is sended
    successfully, but from communicator is not. Probably problem is in
    different JVM on devices.

+ Reply to Thread