Hi Mustafa:

    Now it is clear what you are trying to do. But Kannel can't help
you because it sits at "the other side of the line"

              Service <-> Kannel <-> SMSC <-> Your phone

    What your application is trying to do (send an SMS from a J2ME
application) unfortunately has nothing to do with Kannel.

    I advise you to post your questiong to forum.java.sun.com.

    Best regards,

Rodrigo.

On 11/4/06, Mustafa Cayci <[EMAIL PROTECTED]> wrote:
>I don't know what you're trying to achieve with that, what is
>MessageConnection and TextMessage is for and what library they are
>coming from so I can't speculate on that.
I am using Java 2 Platform Micro Edition (J2ME) to write and deploy Java
code in mobile devices.  Since I don't have real mobile device, I am using
Sun Java Wireless ToolKit (WTK) to emulate one.  So the code sniplet in my
previous email is a J2ME code and the libraries are from
javax.microedition.io.*.  Now my goal is to write a simple Java code and
deploy to the WTK emulator that sends a SMS message to a SMSC.  Can I use
Kannel to do what I explained above?

I don't want to use HTTP interface as shown below to send SMS message.
That is not what I want to do.

>http://smsbox.host.name:13013/cgi-bin/sendsms?username=foo&password=bar&to=0123456&text=Hello+world

Regards,

Mustafa




On 11/3/06, Enver ALTIN <[EMAIL PROTECTED]> wrote:
> On Fri, 2006-11-03 at 13:28 -0500, Mustafa Cayci wrote:
> > Thanks Enver.  I was playing with the
> > http://yourserver:sendsms-port/cgi-bin/sendsms.
> >
> > However, J2ME does not like the connection this is returning.  I am
> > getting java.lang.ClassCastException
>
> [...]
>
> > String address =
> >
"http://138.1.117.234:13013/cgi-bin/sendsms?username=tester&password=foobar&to=0123456
";
> > conn = (MessageConnection)Connector.open(address);
> > TextMessage txtmessage =
> >
> > (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);
>
> I don't know what you're trying to achieve with that, what is
> MessageConnection and TextMessage is for and what library they are
> coming from so I can't speculate on that.
>
> What I can tell is, if you click on the URL link above, Kannel should
> receive an HTTP GET request via the sendsms CGI interface and process it
> appropriately.
>
> -HTH
> --
> .O.
> ..O   Enver ALTIN                   |   http://enveraltin.com/
> OOO   Software developer @ Parkyeri | http://www.parkyeri.com/
>
>
>



Reply via email to