Code for sending sms

Hi, i'm a Newbie for J2ME and i'm working on a project which requires to send sms.. Can anyone help me..its urgent....
Mail to : [email protected]

Look at the URL below:
Sending/Receiving SMS on J2ME device
http://www.java-tips.org/content/view/98/73/

Similar Messages

  • Error while writing a code for sending SMS in METHOD http_client_receive

    Hi friends,
                   I have a requirement, where i have to send a SMS from SAP system, i tried follwing codes but in both it is giving me same error. HTTP path mensioned below[ztest_02] is provided by service provider.
    I tried the same url in explorer and i received the SMS properly.
    REPORT ztest_02.
      CONCATENATE
      'http://hapi.smsapi.org/SendSMS.aspx?UserName=xyz&password=586998&MobileNo=919836789543'
      '&SenderID=serdc&CDMAHeader=919833678945&Message=Hirdffan'  INTO  wf_string .
      CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url                = wf_string
        IMPORTING
          client             = http_client
        EXCEPTIONS
          argument_not_found = 1
          plugin_not_active  = 2
          internal_error     = 3
          OTHERS             = 4.".......................THIS IS WORKING FINE .. RETURNS SY-SUBRC = 0
      CALL METHOD http_client->send
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2.".......................THIS IS WORKING FINE .. RETURNS SY-SUBRC = 0
      CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.".......................NOT WORKING FINE .. RETURNS SY-SUBRC = 1
    I COPIED ANOTHER CODE FROM NET WHICH IS AS FOLLOWS AS GIVES SAME SY-SUBRC IN SAME METHOD.
    CONCATENATE 'http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry?CountryName='
                p_cnt              INTO http_url .
    CALL METHOD cl_http_client=>create_by_url
       EXPORTING
         url                = http_url
       IMPORTING
         client             = http_client
       EXCEPTIONS
         argument_not_found = 1
         plugin_not_active  = 2
         internal_error     = 3
         OTHERS             = 4. " ...RETURNS SY-SUBRC = 0
    http_client->request->set_header_field( name  = '~request_method'
                                            value = 'GET' ).
    http_client->send( ).
    CALL METHOD http_client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          OTHERS                     = 4.  '".........THIS RETURNS SY-SUBRC = 0
    My question is why it is failing in same call...
    Is there any authorisation issues?
    Any call is missing in between?
    Is there any network issue?
    pls help........
    Edited by: kiran chorge on Mar 11, 2010 7:42 AM

    Hi Kiran,
    I just resolved this error in my system. If you are running on AIX, then your DNS server will most likely not be configured. To fix this you just have to make the HTTP call without the domain name.
    Just ping the HTTP and find out which IP it is going to, then rewrite your HTTP address as below :
    http://<IP ADDRESS>/SendSMS.aspx?UserName=xyz&password=586998&MobileNo=919836789543'
    '&SenderID=serdc&CDMAHeader=919833678945&Message=Hirdffan
    This should resolve your error. Also the HTTP message you are getting in the given method actually refers to the problem in conversion of a domain name to an IP address as the DNS server is not available. So everything is most likely working fine.
    Thanks & Regards,
    Aditya

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • API's for sending SMS messages

    Where can I find documentation on how to send/receive SMS messages via Oracle WE? Are there any API's available? I am currently on v1.0.2.2.

    Hi Friend,
    It is a great difficult to find API for sending SMS messages....but i succeeded....for sending SMS messages there is a Class Calles SmsSender and use
    sendSms(String mobileno, String message).....it will send message to the given mobile no...before i hope u have configured SMS Properties in Notification.properties file..
    and Coming to receive SMS...there is one more Class SmsServer which listens to all the messages coming on the configured port..now you need to customize this class...
    All the best....
    Cheers
    Krishna

  • SMS Provider for sending SMS from SAP BI server

    Hello,
    I need to send sms from sap bi server.
    Which service provider is preferable to use for sending sms?
    Any suggestions?

    You can opt for IDEA...............

  • Best approach for sending SMS through workflow

    Hi Experts,
    I have a scenario where in I have to send SMS as a part of an escalation workflow process.I wanted to ask to the forum as to what is the best approach to send sms from workflow.The information regarding the users and the numbers is to come from a table.So how do I integrating the workflow with the SMS.
    I am stuck with this problem and need urgent help with this..Any help would be sincerely appreciated.
    Thanks and Regards,
    Narsingh

    Hi Narsingh Panigrahi,
    Have you checked this function module as i suggested previously.
    Function Module--TELEPHONE_FROM_TO
    Since configuration is not done in our system i cant test this function module
    In this function module they have used this table TSP01
    The fields are
    RQTELELAN--country
    RQTELENUMTelecommunications partnerfrom
    RQTELENUMETelecommunications partnerto
    Function Module--TELEPHONE_FROM_TO
    In this function module they have used this table TSP01
    The fields are
    RQTELELAN--country
    RQTELENUMTelecommunications partnerfrom
    RQTELENUMETelecommunications partnerto
    When you are entering the telephone number you have give prefix country code ( for US it is 011) and at the end of the number you have to give the to country code that is ( for IN it is 91).
    Try this and let me know.
    Regards,
    Balaji E.

  • Code to send sms using j2ee application

    Hi all,
    this is shashi kant,
    plz send me the code to sent a sms using j2ee applications.
    or tell me the api these are used to  develop this kind of application.
    thanks
    my email id is---- [email protected]

    I'm working on a project to send SMS from a MIDlet
    to a servlet and back to the MIDlet through a
    SMSC.can anybody send a sample code for me to get
    help ?you should have a sms server .
    your MIDlet send the parameters to the servlet (mobile phone, message, ..) and, after, the servlet send a request to the sms center and he send to the mobile number the message !
    good luck

  • Code for send button. I need your help, guys!

    I would appreciate a Java code for a "send" button or a "send page" link that would send a complete web page to my email address. I have some forms for my users to fill out online and send them to me, and so the problem I am having is that when I use FrontPage forms (text boxes, check boxes, radio buttons, etc.,)for them to use, I am getting the input from those form only. What I NEED to get is the complete page, exactly what the users see on the screen with all the text in the forms. The need for this is that these forms (reports) will later be printed out, so they MUST look exactly as on the screen.
    So I am thinking a bit of Java code could help me out. Would you give me a hand guys? Thanks!

    Do some JNI and take a snapshot of the screen, it is the ONLY way I know to ensure EXACTLY what you ask for: even the HTML from the page may look different than what the users sees when filling out the form when that HTML is displayed on a different machine and system.
    Otherwise your agument seems a little trivial and you could just replicate the form on your local machine and insert the data you captured with a normal post operation into the local copy of the HTML form.

  • What are the steps for sending SMS through IMS5.1

    I have IMS 5.1 solaris version and I want to send SMS through this Messaging server, Is there any need for the gateway/any other server/requirements for accomplishing this?

    iPlanet Messaging Server 5.2 supports one-way email to an SMS gateway.For SMS channel configuration please refer to
    http://docs.iplanet.com/docs/manuals/messaging/technotes/5.2sms.html

  • Best app for send sms via email?

    Anyone got any idea what the best app is to download to send sms via email?
    I downloaded text-free yesterday, but doesnt work and the message keeps bouncing back to my email in box as a failed mail delivery!!
    I am in the UK in case that makes a difference!!

    If you want to text people for free, i highly recommened AIM application. Its an IM app built in with an feature that allows you to text anyone on your contacts for free. Just let them know that its you texting them the first time.

  • Java apis for sending SMS

    I want to send sms through a mobile connected to my computer through some datacable. Are there any APIs or tools or anyhting in JAVA to do this? I will be happy if its available for Linux as well as windows

    Hi Sue,
    it doesn't have such API's. You have to use it through Developer Studio. Yet.
    Regards,
    Benny

  • I have an ipad mini 16G wifi - why can't I send SMS txt msg and only imessages?  On the settings, there is no option for "send SMS when imessage not available" like on my iphone.

    Why can't I send SMS messages from my ipad mini 16g wifi?

    Even when your iPad Mini has a 3G cellular modem onboard, the iPad Mini still can NOT send or receive SMS Text messages.
    The 3G modem is only used for a internet data connection and has no software to either send or receive SMS text messages even though the hardware is available.
    I can confirm this with the iPad Mini iOS6.1 with 3G cellular modem.
    Apple Support has this issue currenlty under investigation - you can follow this issue here:
    Ipad Mini with 3G prepaid internet.

  • Abap code to send sms

    Hai Everyone,
             I am developing a small leave application. as of now functionally everything is working perfectly. but as an added feature to this application I wanted to provide an option where employees could apply for leave by sending sms as well as the response from the team lead can be done using sms itself. so, please provide me some ideas on how to implement this.
    - Rozario
    Edited by: Halley Rozario on May 3, 2011 11:33 AM

    Hi,
    Sending an SMS from SAP is simple as there are many Vendors(some offer free service with restrictions on no. of chars etc) who expose Web Services which does this, you just need to consume this web service and invoke it within your program. There are many threads/blogs on SDN for this.
    However, receiving an SMS is different game altogether, you might need a GSM/3G modem(software) connected to a service provider etc or use a SMS gateway. There are many software which can do this for ex: Diafaan etc.
    Regards,
    Chen
    Edited by: Chen K V on May 3, 2011 3:21 PM

  • Does any one have a sample code for sending email using IMAP ?

    Hi
    thank you for reading my post
    I have tried to use SMTP and because of some problems i could not use it and i must use Imap (authentication required)
    here is my SMTP code , does any one know how i can tune it to use Imap , or has a code snippet to send email using Imap ?
    thanks
    private static void postMail(String[] recipients, String subject, String message,
                             String from) throws MessagingException {
            boolean debug = false;
            class SMTPAuthenticator extends javax.mail.Authenticator
                    public PasswordAuthentication getPasswordAuthentication()
                        return new PasswordAuthentication(mail_usrname,mail_password);
            //Set the host smtp address
            Properties props = new Properties();
            FileInputStream fis;
            try {
                System.out.println("Loading property file");
                fis = new FileInputStream(new File("c:/email.properties"));
                props.load(fis);
                System.out.println("property file done");
            } catch (FileNotFoundException e) {
                System.out.println("file not found");
                e.printStackTrace();
            } catch (IOException e) {
                System.out.println("can not read properties file");
                e.printStackTrace();
            /*props.put("mail.smtp.user", mail_usrname);
    props.put("mail.smtp.host", smtpHost);
    props.put("mail.smtp.port", smtpPort);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.socketFactory.port", smtpPort);
            // create some properties and get the default Session
            Authenticator auth = new SMTPAuthenticator();
            Session session = Session.getDefaultInstance(props, null);
            session.setDebug(debug);
            // create a message
            Message msg = new MimeMessage(session);
            // set the from and to address
            InternetAddress addressFrom = new InternetAddress(from);
            msg.setFrom(addressFrom);
            InternetAddress[] addressTo = new InternetAddress[recipients.length];
            for (int i = 0; i < recipients.length; i++) {
                addressTo[i] = new InternetAddress(recipients);
    msg.setRecipients(Message.RecipientType.TO, addressTo);
    // Setting the Subject and Content Type
    msg.setSubject(subject);
    msg.setContent(message, "text/HTML");
    System.out.println(msg.toString());
    Transport.send(msg);

    Please try this out!!!!!!!!!
    You can send emails using Outlook also. You can send email over Microsoft Exchange with this object (or another email server, using IMAP/POP).
    Sub SendMailOutlook(aTo, Subject, TextBody, aFrom)
    'Create an Outlook object
    Dim Outlook 'As New Outlook.Application
    Set Outlook = CreateObject("Outlook.Application")
    'Create e new message
    Dim Message 'As Outlook.MailItem
    Set Message = Outlook.CreateItem(olMailItem)
    With Message
    'You can display the message To debug And see state
    '.Display
    .Subject = Subject
    .Body = TextBody
    'Set destination email address
    .Recipients.Add (aTo)
    'Set sender address If specified.
    Const olOriginator = 0
    If Len(aFrom) > 0 Then .Recipients.Add(aFrom).Type = olOriginator
    'Send the message
    .Send
    End With
    End Sub

  • T.Codes for Sending material outside..?

    HI gurus
    Can anybody explain me , what are all the T.codes available in STA SAP related to Sending materials to outside like Drillngm/c, grinding m/c,..etc
    To do the some customer service work.. materials are not consumable, we wil use the material for some service work at customer place and get back to my company.
    Pls explain me the abt the T.codes
    Thanks
    sap-mm

    Hi,
    There are two ways of handling your scenario. If the material which you are sending is a valuated material, then please create a "Z"movement type with the valuation option unchecked, so that you can issue against a cost center, by treating customer as a cost center. This causes a decrease in the stock of the material. Again when you want to bring the material back to the stock, you can verywell reverse the earlier transaction. Apart from it, you can have a development unlike the delivery challans (DC's) in the legacy in SAP and send the materials on the same.
    IF the material is non-valuated, you can send them on "201" mvt type only, which does not affect the value of the stock at any stage.
    Hope this answers your query.

Maybe you are looking for

  • Why do PDFs no longer appear in Firefox after registering CS6 in MacOS?

    I have a 2-year-old MacBook Pro with (I think Mountain Lion (MacOS X 10.8.1). I have Creative Suite Design Premium installed. I went to buy Creative Suite Web & Design Premium CS6. While I waited for it to arrive, I installed the demo, and when my pa

  • Analyzing core dumps generated by JVM

    I have an application written in Java that is crashing with JVM core dumps. All debug symbols have been installed but since the default build of JDK doesn't have Java binary with debug information, it is difficult to nail down the problem. gdb shows

  • Nested table too wide in IE7, fine everywhere else

    I have a table nested into a table cell in a pretty much straight HTML page. It renders fine in Safari and Firefox Mac, and in Firefox Win. The nested table renders about 25 pixels too wide in IE7. Can't check IE6 because my install overwrote v.6 whe

  • [SOLVED] emacs-w3m

    I'm probably missing something obvious here, but I've installed both emacs-w3m and w3m, yet can't figure out how to use it! I've tried M-x emacs-w3m, M-x w3m and M-x w3m-emacs. How do I run it? edit: I googled and solved it by adding the following to

  • APO Table to identify where cells are fixed

    Hello, In DP I'm looking for a means of identifying which cells against which CVCs have been fixed. Is there a table I can look at which references these fixed cells (in the same way as notes are stored)? Any alternative methods of identifying fixed