Send short message from Java application on mobile phone to server; http

Hello!
My question is: can I send short message from Java application on mobile phone to server - with the use of SMS (WMA) or http connection?
I found this topic http://forums.sun.com/thread.jspa?threadID=5405431 about: "how to send data from midlet to servlet using doPost method".
There is also such topic http://forums.sun.com/thread.jspa?threadID=5408046&tstart=0 about: "CLDC and MIDP - sending SMS to server -> Wireless Messaging API (WMA)".
Please, kindly help me.
Code from the topic mentioned above, edited by me so that it can be read easily:
//http://forums.sun.com/thread.jspa?threadID=5405431
//CLDC and MIDP - Re: how to send data from midlet to servlet using doPost method
I want to know how to pass the values .
for examples : this is what i wrote for doGet
String url = setting.getUrl().toString()"/testProServlet/servlet/UpdateCompanyProfile?userId="+loggedInUserId"&svComp="saveCompHex;
userId and svComp has the data which is very long so i wanted to use doPost.
Now i dont know how to do it.
This is what i have done in doGet (midlet)
public void saveCompanyProfile(String saveComp,int flag,String blankFieldNm)
     System.out.println("flag===" flag);
     if (flag==1)
          displayAlert("Company Profile Edit",blankFieldNm+" field cannot be blank.",AlertType.ERROR, edCmpRecForm, true);
     else
          String saveCompHex = helper.encodeHexString(saveComp);
          // String saveCompHex =saveComp;
          HttpConnection httpConn = null;
          serverSettings setting = new serverSettings();
          System.out.println("saveCompHex===" saveCompHex);
          String url = setting.getUrl().toString()"/testProServlet/servlet/UpdateCompanyProfile?userId="loggedInUserId"&svComp="saveCompHex;
          System.out.println("url of save company profile:: "+url);
          InputStream is = null;
          OutputStream os = null;
          try {
               // Open an HTTP Connection object
               httpConn = (HttpConnection) Connector.open(url);
               System.out.println("urlMidlet1 save edited company data===::" url.length());
               // Setup HTTP Request
               httpConn.setRequestMethod(HttpConnection.POST);
               httpConn.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
               System.out.println("urlMidlet2===" url);
               int respCode = httpConn.getResponseCode();
               System.out.println("respCode edit company profile=====" respCode);
               if (respCode == httpConn.HTTP_OK)
                    StringBuffer sb = new StringBuffer();
                    os = httpConn.openOutputStream();
                    is = httpConn.openDataInputStream();
                    int chr;
                    while ((chr = is.read()) != -1)
                         sb.append((char) chr);
                    String sResultSvCompanyProfile= sb.toString();
                    System.out.println("+++++++++++++Company sResult+++++++++++++==="sResultSvCompanyProfile);
                    if (resultViewCompanyProfile.trim().equals(""))
                         System.out.println("++++++++++++++If++++++++++++++SaveCompanyProfile===");
                         displayAlert("Login Incorrect","Username and Password incorrect", AlertType.ERROR, mainForm, true);
                    else
                         System.out.println("++++++++++++++Else++++++++++++++SaveCompanyProfile===");
                         //companyProfile();
                         displayAlert1("Information","Company Profile edited successfully", AlertType.INFO, profileMenuScreen, true);
               else
                    System.out.println("Error in opening HTTP Connection. Error#" respCode);
                    //the line below divided into two lines because it was too long
                    displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
                    AlertType.ERROR, mainForm, false);
          catch(IOException e)
               e.getMessage();
          finally {
               if(is!= null)
                    try
                         is.close();
                    catch (IOException e)
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                         displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
                         AlertType.ERROR, mainForm, false);
               if(os != null)
                    try
                         os.close();
                    catch (IOException e)
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                         displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
                         AlertType.ERROR, mainForm, false);
               if(httpConn != null)
                    try
                         httpConn.close();
                    catch (IOException e)
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                         displayAlert("Connection Failed","Cannot connect to server, please contact the Administrator.",
                         AlertType.ERROR, mainForm, false);
          } //end finally
     } //end else (?)
} //end savecompany

hi,
SMS API(WMA) is an optional package. It is not a MIDP1.0 or MIDP2.0 api's.
There are phones which has WMA api with MIDP1.0 support .... Nokia 3650
Seimens has some phone with their own api's to send sms.Check out seimens site for more info
BTW, What do you mean buy sending SMS to Server????
If you want to send message to server you can do it with Http.
HTH
phani

Similar Messages

  • How do i send sms messages from my mac to a phone

    the gurl from apple said i could send sms messages from my imac to a phone. How do i di that?

    Hi Lanny,
    Actually those two pics don't tell you what you need to know.
    The First is correct as it can be from the Messages app but the second goes to no way to tell you how to do and b fact does not even mention SMS messages.
    @ 10411
    You will need to have an AIM or AIM Valid name that you can add to the Messages > Preferences > Accounts at the + icon below the list.
    Next the Mac need to be in the United States.
    Go to System Preferences > Language and Text and set the Region to the Untied States.
    (In iChat this added SMS items to some of the Menus in iChat)
    The iPhone has to be on a Carrier that is in the United States   See list
    Which in turn means the phone number is a United States one (+1 country code)
    This means you add the Cell/mobile number as if it were a Buddy to an AIM list.
    So Creating an Address Card for "SMS Test" and adding the mock number +1234567890 to that I get this in Messages  (Mousing over the Name to see the "Screen Name" which is the number in this case)
    Basically this is a feature that iChat has always had since AIM included a link to SMS to certain Phones.
    Messages does everything iChat did/does and this includes SMS Messaging via an AIM Buddy list even though in this case the Menu items has disappeared.
    AS has been said there are also other methods.
    8:24 PM      Saturday; April 6, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Sending ADT message from java

    Hello,
    I'm trying to send an ADT message from Java using the JMS API.
    However, when compiling the java program it complains on the
    following statement :
    adt_msg.setAdtPayload(empmsg) ;
    because it is expecting empmsg to implement the deprecated
    CustomDatum interface instead of the ORAData interface.
    I suspect the problem is linked with the version of the
    AQAPI.jar file I'm using. I tried already the file that comes
    with the Linux version and the one with the W2000 version but
    both give the same problem.
    Any suggestions ????
    tx,
    Roger.

    Hi,
    The AQ JMS api in 9.0.1 still expects CustomDatum payloads. When
    you generate the java class using Jpublisher, use the following
    flag:
    -compatible=customdatum
    In 9.0.2 and iASv2, the AQ JMS api will support the OraData
    interface as well. I think if you can get the 9.0.1.2 patch,
    that also might work
    Bhagat

  • Can't send video messages from the Skype by mobile

    hi,
    i have nokia x2 mobile pone. i had installed skype in it. i can take vedio calls from skype using the camera. but i can't recode vedios to send vedio messages. when i start to recode vedio to send. application stops. sometimes entire skype application is stop. please help me to fix this problem.

    Ok. Trying to send a video message fro the desktop. Some contacts when chosen do not have this as an option, the ones that do, when I click on it, I get an error message that says:
    "OOPS! Somrthing went wrong. Please tray again or get in touch." Trying again gets the same result, and I can find nowhere to "Get in touch" with skype.
    Thank you.

  • How to send response message from Java mapping class? Please help!

    Hi Experts,
      I have a sync scenario
              -Req-->  -
    >
    SOAP           XI       RFC
              <Res--     <-----
      The Req message contains:
      <Order>
           <Orderid>100</Orderid>
           <Desc>Extrenal Order</Desc>
           <Qty>2500</Qty>
      </Order>
      Response message is:
      <Log>
         <LogTxt>Qty value cannot be more than 3 chars</LogTxt>
      </Log>
      In the XI I have to validate the input request message using a schema. For this I am writing a java mapping program using aii_map_api.jar.
    My requirement is that If the input message schema validation fails then I want to send a response message back to sender.
      How can I send a response message back to the sender in java mapping program?
    Kindly help with sample code example.
    Thanks
    Gopal

    Hi,
    First, I think PI 7.1 has this functionality and perhaps it comes in a SP for PI 7.0 and XI 3.0.  So first have a look at that before creating custom development.
    Second, if you use the java mapping, you will only have access to a request or response message.  I would advise using a custom java module in the module processor and insert this message in the sender communication channel.  This will allow you to validate request and send a response.
    Regards,
    Yaghya

  • Can anybody tell me how to send/receive  the sms from java application

    Hi All,
    Can any body tell me, how to send/receive the sms from java application to mobile phones.
    I have installed the jsms engine and when i try to connect to the mobile device ,the jsms server is giving
    the following error.
    Cannot connect to GSM Device, error : -11

    Which jsms? Google finds several.
    Try the website where you downloaded it.

  • Can any body tell me, how to send/receive the sms from java application

    Hi All,
    Can any body tell me, how to send/receive the sms from java application to mobile phones.
    I have installed the jsms engine and when i try to connect to the mobile device ,the jsms server is giving
    the following error.
    Cannot connect to GSM Device, error : -11

    The best place to ask your question is at the JSMS website, forum or mailing list since this is no error that directly comes from a class belonging to the core Java classes.

  • JMS message from one application to the another appl in the same container?

    I have a question.
    Can I send JMS message from one application to the another application in the same container?
    If yes ...can you provide me info.
    I want to know in regards of EJB2.0 and EJB3.0.
    Thanks,
    Rahul

    So the receiver application is a Message Driven Bean, right?
    In your container, do you have a mean to ensure that it is correctly configured to listen the desired destination? Like an administrative console that would show the destinations, the number of pending messages, the number of active consummers...?
    btw what is the destination type? A queue or a topic?

  • Send Text message from adf to mobile device

    Hi All,
    My concern is that I want to send a SMS/text message from adf application to user mobile is there any sample proj / document/example application related to this requirement .pls help
    Thanks
    Edited by: 931029 on Jun 20, 2012 2:17 AM

    The example will not help you
    because the url that we generate we take it from the sms provider ( or the mobile service company )
    so its will not work with you.
    I mean if you want to send sms there is no standard way
    because its depend on the sms provider ( or the mobile service company )
    because every provider have different way>
    So the sms provider must tell you how to generate that URL or what is the a webservice
    that will send the sms.
    Thanks

  • How to send communication message from application server to load balancer

    Hi,
    Environment: 8 application servers are clustered behind a load balancer. Java/J2EE based client-server application
    When any one of the servers is supposed to go down, I want to send a message from that server, programmatically, to load balancer something which signifies "server is down or going down, do not forward any client connections to me". This is to avoid any CLOSE_WAITs.
    How do I achieve this? How can I send message programmatically from app server to load balancer? From very basic knowledge, SNMP can be used for this. But do not know how to start of. Any other means is also OK. Need details.
    Thanks
    Sunil

    At the same time we stop accepting any new connections [ServerSocket.accept() will be escaped during server shutdown].Just close the ServerSocket.
    Both these are working fine. But during the 25 seconds, still the client connections gets queued up trying to find that serverNot if you close the ServerSocket.
    reason being the load balancer is still forwarding requests to this server whose shutdown has started but not completed. So CLOSE_WAITS happen.Not if you close the ServerSocket. Not that the CLOSE_WAITS are the actual problem, as they will all disappear when the server exits. It's more that the clients shouldn't have been able to create the connection in the first place. Which wouldn't have happened if you had closed the ServerSocket.
    If we tell load balancer not to send any more client socket connections, then we completely avoid getting CLOSE_WAITS.If you close the ServerSocket ditto.

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Send sms message from pc to mobile

    hi...
    what we need to send sms message from pc to mobile and how can send it ????
    plz give me step by step
    thx

    Sending an sms message from your PC can be done in many ways. Firstly this can be send via email, simply type in the to field the number followed by the gateway. for example, [email protected] There are also a number of websites that allows you to do this simple search google for "send text message" and will see a list. The one I use is [http://www.wetextfree.com] it works and its free. Hope this helps you.

  • How to call webservice from Java application

    Hi XI gurus
    Pls let me know how to call a webservice from Java application.
    I wanted to build synchronous interface from Java Application to SAP using SAP XI
    For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
    Regards
    MD

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • How to send JMS message from pl/SQL to jBoss

    Hi all,
    I need a helping. This is my problem:
    There's a queue which is definitied under the Jboss. I would like send a message from pl/SQL to jBoss.
    Why is't working??
    http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/jms/Readme.html
    thnk's,
    fgy,,

    You can defince a queue in Oracle, then access this queue from your Jboss application. Not sure if you need JMS, but there are some Oracle OCI functions that are certainly helpful for such a task.
    You might look into further details be reading the manual on Oracle Advanced Queuing or Oracle Streams.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/part4.htm#i436427

  • How to send the message from front end to XI in sender webservice

    Hi All,
    I am doing webservice to proxy scenario, we want to send the message from front end to XI, front end is java application. can any one please guide me the steps need to done for front end to XI.
    1) we wrote a webservice
    2) i have created data type message type and message interface in IR
    3) i have created sender soap adapter with interface name and namespace.
    4) i have generated webservice in ID
    but how can we send the message from front end to XI sender soap adapter.
    Kind Regards,
    Kiran

    Hi,
    Before going with the SOAP Adapter i suggest you to go through this Disscussion
    Re: about http and soap
    If you are going with the SOAP Adapter means
    >>but how can we send the message from front end to XI sender soap adapter.
    you have to use the XI  Server URL( http://host name:j2ee port/
    Use this as Refference
    http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    Regards
    Seshagiri

Maybe you are looking for

  • How to increase the speed of Zoom on TIFF image

    Hi everyone, i m doing zooming operation on tiff image. when i applied zoom in operation on image which have properties Bit per sample =1 Image Length = 2200 Pixel Image Width = 1700 Pixel Resolution(x) = 200 dpi Resolution(y) = 200 dpi then it requi

  • How to add email signatures

    How do I add an email signature to my email?

  • Need help reading raw files!

    Help please!  Cannot read raw files of my Nikon D5000.  Have downloaded Camera Raw 5.3 and followed instruvctions.  5.3 supports the D90 which is supposedly essential the same.  Any suggestions?

  • SPAU: difference in development and on QA/PRD system

    Question from Customer: After Release upgrade and SP-application we have completed the  SPAU on the development system and after Upgrade/SPAM application of QA/PRD system  we have imported the SPAU request into the QA/PRD, but after the import there

  • Running lightroom catalog on an MS-DOS drive

    I need to create a cartalog that both PC and Mac users can access. I created the catalog (LR 3.4.1) and loaded the pictures on my mac, then copied the entire folder (previews, catalog file, pictures and all) to the MS-DOS drive, but when I open the c