Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

SMS website

  • 17-11-2004 6:55pm
    #1
    Closed Accounts Posts: 603 ✭✭✭


    Hi, i will be trying to send an sms from a servlet for a forthcoming project.What are the steps involved in doing so, let alone code please.
    thanks :eek:


Comments

  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    maybe i should specify a bit more.i need the facility to be able to send sms from a servlet, how can this be done?
    thanks


  • Registered Users, Registered Users 2 Posts: 14,378 ✭✭✭✭jimmycrackcorm


    use an sms service provider e.g. clickatell with xml over http

    http://www.clickatell.com/brochure/products/api_xml.php


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    thanks for that.i know how to use xml (create documents) but how would you use xml/http?? thanks for the reply.


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    wouldnt the http sms gateway api be suitable for a servlet??im not sure though


  • Closed Accounts Posts: 324 ✭✭madramor


    thanks for that.i know how to use xml (create documents) but how would you use xml/http?? thanks for the reply.

    First get a HttpUrlConnection and then get the stream and send the xml in the
    stream, get input stream and read the response.


  • Advertisement
  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    whats the point in using xml/http, i dont understand where xml comes into sending an sms from a servlet.
    :/
    thanks


  • Closed Accounts Posts: 324 ✭✭madramor


    1:first you are not sending the sms from a servlet.
    2:you are sending it from the sms server.
    3:the servlet connects to the sms server

    3:
    user enters details into form and hits button
    form goes to servlet
    servlet reads data from the form
    servlet gets http connection to sms server
    servlet uses data from form to create xml
    servlet sends xml over http to sms server
    sms server sends message to desired number

    this is an example of what xml was designed for, if you don't understand this
    you have missed the whole point of xml.

    xml was designed to be a ad hoc method of storing data, so that it could
    be understood be different languages/application

    the details you enter in the form are converted to xml so that the sms server
    can understand the information.

    example
    you enter in the form
    number=123
    message=my message

    so when the servlet gets this info it then passes it to sms server. but how
    simply send "123 my message" or "my message 123" or "number=123message=my message"
    this is why xml is need the sms server has a dtd describing how message should be send
    <xml>
    <num>123</num>
    <mess>my message</mess>
    </xml>


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    thanks for that.crystal clear! :D


  • Registered Users, Registered Users 2 Posts: 1,327 ✭✭✭Nasty_Girl


    now along those lines can anyone give me some tips for sending MMS from a website!


  • Registered Users, Registered Users 2 Posts: 14,378 ✭✭✭✭jimmycrackcorm


    have a look at the documentation on http://www.clickatell.com - they have multiple methods of communicating.


  • Advertisement
  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    I dont want to start a new thread so ill ask here.I asked about sms sending, thats fine.Im familiar with javamail and connecting to smtp servers but would it be possible to connect a servlet to a pop3 server and have it run indefinately or periodically to check for new email?if servlets are not a good idea what would be the best approach?
    please help!
    thanks again for your help on the named topic.
    kind regards


  • Closed Accounts Posts: 324 ✭✭madramor


    I dont want to start a new thread so ill ask here.I asked about sms sending, thats fine.Im familiar with javamail and connecting to smtp servers but would it be possible to connect a servlet to a pop3 server and have it run indefinately or periodically to check for new email?if servlets are not a good idea what would be the best approach?
    please help!
    thanks again for your help on the named topic.
    kind regards

    servlets are not designed for this.

    servlet recieve a request and send a response,it is a 1 time thing.

    what you could do is set a refresh header in the servlet reponse,
    so that the servlet sends the reponse to the browser and then
    recalls the servlet at the given refresh rate.
    this would be like hitting the refresh button on the browser ever few
    seconds and recalling the check mail servlet.
    it is not an idea option.

    you can also use a javascript timer function to call a check mail servlet
    every few minutes

    most webmails apps need you to hit the check mail button to check for
    new mail, rather that the application checking for you.


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    thanks for that reply.i suppose servlets is not the way to go, as it seems to messy.Is there any other option?i have tested out the o2 sms email notification, would love to know how that works!is it possible to do this anyway besides servlets?
    thanks again


  • Closed Accounts Posts: 603 ✭✭✭shamrock2004


    what ive decided to do is have a program running on a designated machine that constantly checks a POP3 server and then notifies a servlet if email arrives.the servlet then dispatches notification to a user.thanks for the help :)


Advertisement