Initiative message sending from server to MIDP client.

Hi, guys,
I wanna build a c/s application using CLDC and MIDP, the problem is the expected system should have a capability of making server and client could communicate in demand, i.e. let either server or client send initiative messages to the opposite side.
But currently, HTTP support couldn't match such requirement, so anybody could raise a good idea?
Thanks a lot!

[xiaxing],
You might find this feature that you are looking for in the next MIDP 2.0 specification when it supports "Push Architecture". This feature allows the MIDlet to request the handset to listen for certain data or connections and launch the MIDlet or give it connection when listener receives the correct data or connection.
You can access the details of the JSR for the MIDP 2.0 specification from:
http://jcp.org/jsr/detail/118.jsp
HTH.
Rgds,
Allen Lai
Developer Technical Support
Sun Microsystems
http://access1.sun.com

Similar Messages

  • Copy a .swf file from server side to client using signed applet

    Hello All,
    I already have my applet signed and its working pretty well. However I want to know how can I import a .swf file into clients machine. The .swf file initially is on server side, my applet checks whether this .swf file exists already on client machine. If not it copies it to his machine.
    I know how to chk if the file already exits on client machine but I am not sure how to copy this .swf file to his machine if its missing.
    May be I need to set some input buffers from server side and then copy them to his machine.
    Can some one throw some light on this issue ??

    Hello to all Java Code Masters out thr,
    I am trying to copy a .swf file from server side to client side, however I am unsuccessful in writing the correct data. By correct data I mean that , the data does gets saved on the client side in the .swf file, and the size of the .swf file on client side is as expected, but some how I don't know why the data is not the same as expected.
    I tried opening up both the swf file, one which is on server side and the other which is on client side. And both looked different in the notepad.
    When I opens up the client side .swf file on browser it shows nothing while the .swf file on server side worked fine.
    Here is a snap shot of the two .swf files when opened in notepad:
    clientside.swf
    坃ࡓ죃鱸뷤瀉�ᡚ穸s歒斷뛉쭬ⶲ뉯緤░뉋쭬틲��毳띵뺤畮祮୹釯烉쉍‼➀Ƿℵ㼤ꦅ㼌⡉⁈ș㖩䈼ꦓɊጵꨘ妆ၸ쇠鳳ﯯ龜괯䪅�쿾칿칷컹緶履殖㋿罣쯻杬�懨�E�翂䶙幷鿠︡拡ﬦ댨꾖政ᯋὣꯤ糥䧩缿䨗捫嶺깼瘶羋⯞勹쪾癞ঞ頁韧୘롻ⱖ撯貊攗閩㫙↳萰Ⳁ⼈쳂荡᧰ﻶ顠꓈鸎싔㿄㰧柂䪄러䂀좹㏠ꕊ㌏힟䘜㦴⌙⍈㽾ꙴ㿯렑㽔serverside.swf
    CWS�� x���     p��ZxzS�Rk�e��l��-o��}�%K�l�������]��ku���nu��nyy���pM�< �'�5!$����I
    (H �
    5<B
    ��J5��Yx��������/����J������w����}���
    k�2c��lg���a��\�%��serverside.swf is what I expect to be saved, but clientside.swf is what i get.
    Below is a code snippet which I am trying :
      public void writeswftoclient(String swfcontent) {
        String userHome = System.getProperty("user.home" );
        String ImoracleDirectory = userHome + "\\MyFolder";
        File fdirectory = new File(ImoracleDirectory);
        if(!fdirectory.isDirectory()) {
          fdirectory.mkdir();
        String playlist = ImoracleDirectory + "\\clientside.swf";
        File fplaylist = new File(playlist);
        try {
          Writer output = null;
          output = new BufferedWriter(new FileWriter(fplaylist,true));
          *System.out.println(swfcontent);*
          *output.write(swfcontent);*
          output.close();
        catch (Exception e) {
          System.out.println("Cannot create or write to the playlist");
      }In above code I am trying to write the string swfcontent, which contains the data shown above in serverside.swf, to clientside.swf.
    Interesting thing is that I am doing System.out.println(swfcontent); just before writing the data to clientside.swf using output.write(swfcontent);. And System.out.println does print the write data on the java console. However I dont know out of what reason the data doesnt get written correctly on the client's computer.
    Kindly help me in this plzzzzzzzzzz.

  • How to send Subtopic Message From Server-Side to Client ?

    I’m new at flex and i have a new question about Flex
    Message Service.
    How to send messages from Server-Side Java Code with
    Subtopic?
    For example.
    I customed a Flex Message Adapter in Tomcat Server , with
    this Adapter , i can send message to Client with following code .
    ---------------------Send message to Client------------
    MessageBroker msgBroker =
    MessageBroker.getMessageBroker(null);
    String clientID = UUIDUtils.createUUID(false);
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination("CustomMsgServiceDes");
    msg.setClientId(clientID);
    msg.setMessageId(UUIDUtils.createUUID(false));
    msg.setTimestamp(System.currentTimeMillis());
    msg.setBody(clientID + "this is my message from server! \n");
    msgBroker.routeMessageToService(msg, null);
    ---------------------Send message to Client------------
    But i want send a message that have Subtopic to the Client ,
    How to do ?
    Thank you for reply.

    There's a white paper that talks about this subject -
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=8f1eb6ea

  • Message Send from ABAP Proxy implemented in XI Server ABAP Stack

    Hello everyone,
    I have a question and I'm not sure of this is an ABAP question but I'll try here and try to find some information on ABAP forums and weblogs, I need to send a XML message to the XI pipeline from an ABAP Server Proxy implemented in the same XI ABAP Stack Server, why I need this? well actually I can't find a way to do it in a BPM so I'm going to try to set the logic for this message send in the ABAP Stack, so do you know like a Function Module so I can send a message to the pipeline but I need the message to be set as Scheduled, I'll try ABAP Forums and Weblogs too, thanks in advance.
    regards,
    julio

    Hi
    You can schedule your program as a background Job SM36. Please check the transaction. You will have to set your ABAP program as the job STEP (if you probably have selection screen for your report then you will also need a variant for your report).
    Do schedule your program as a 'Periodic Job' and your personal period (daily/hourly).
    After you save your settings you can also monitor your job (ABAP Program) from the same transaction or even from CCMS if you like.
    Thanks
    Gaurav

  • ACE: Initiate connections from server vlan to client

    With my ACE, I'm trying to initiate connection from server to client side. This connection is refused by ACE (ACE sends a RST for this connection). I think I missing something.
    From client to servers off course I have no problem. Thanks in advace for your help.

    You need an inbound access-list for traffic to be passed. Probably you do have an inbound access-list on the client vlan but not on the server vlan ?

  • How to download a file from server machine to client machine using jsp

    Hi,
    In my application, I have an excel file stored on my server machine. How can I download that excel file on to my client machine using jsp. Is there any other way I can open that file from my machine and save it in my machine using jsp/java?
    Its an emergency for me to do this.
    Can anyone provide me the full code to download a file from server machine as I don't have
    time to browse through various sites.
    thanks in advance,
    Tiijnar

    Please post your code using code tags (click on CODE above the text area, when posting)
    response.setContentType("application/octet-stream");Why octet-stream? Set the correct mime-type.
    String disHeader = "Attachment; Filename=\"filename\"";The filename should just be the file's name. Not the complete path to the file! This will tell anyone where the file is located on the server. It's also inconvenient because by default,the browser will suggest it as the name for the download.
    Your way of writing to the output stream is just plain wrong. See this snippet (picked from [http://balusc.blogspot.com/2007/07/fileservlet.html])
            BufferedInputStream input = null;
            BufferedOutputStream output = null;
            try {
                // Open streams.
                input = new BufferedInputStream(new FileInputStream(file), DEFAULT_BUFFER_SIZE);
                output = new BufferedOutputStream(response.getOutputStream(), DEFAULT_BUFFER_SIZE);
                // Write file contents to response.
                byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];
                int length;
                while ((length = input.read(buffer)) > 0) {
                    output.write(buffer, 0, length);
                // Finalize task.
                output.flush();
            } finally {
                // Gently close streams.
                close(output);
                close(input);
            }

  • Copy a file from server to the client - URLConnection to a Portal page

    Hello:
    I have an application running on the client side. When the app startup it must open a file which is at the server side, to be more specific, the file is at KM content of the portal.
    I try to read it with URLConnection to copy the file from the server to the client, the app will do it, but "Server returned HTTP response code: 401 for URL:"
    If you copy&paste the url's file directly on the browser (http://host:port/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/ImagenesIM/file.txt) a login popup (look and feel windows) is display. After entering the user and psw the file is open without problem.
    Any idea what can I use or how do it ?.
    I think that probably I have to move the app to a was directory instead of portal directory.
    The app is execute via *.jnlp with a link at a portal page.
    Thanks a lot for your time.

    Javier,
    401 means authentication error, i.e. your application is not authenticated to KM.
    What you can do? Actually, it depends. Check current cookies in your application, probably there are SSO coockie or J2EE authentication cookie. You may try to set this cookies in URLConnection (via addHeader). Otherwise you have to supply authentication creadentials to URLConnection (also via addHeader, most probably, via Basic HTTP authentication scheme).
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • To save a word/xls document from server machine to client

    Hi Folks,
    I am facing a problem in storing a document from server to client machine.
    I have a document in Oracle database BLOB column and i am able to read and open that document in client browser. But it is stored in the server machine when accessing from the client browser it is opening as a read only copy.
    I want to open it as editable copy in client machine and once it is edited i want to save back to the databse. But it can be stored in server or client machine without promting to the user.
    Any one can help me?
    Senthil

    Hi, I am wondering whether this will take time for a document/image which is about 3, 4 MB??? Cos customer has to scan documents one by one and the saving of the file in the DB and then using that to transfer to MSMQ (which is the requirement) should take less time than scanning 2 documents.

  • Controlled messages send from WLC to Syslog

    Customer' WLC4402 S/W is 4.1.0171
    they do not uncontrolled messages send to their Syslog.I already set messages log level=critical failure, but uncontrolled messages is still received on the Syslog.

    You can always try each one. Here is a link
    http://www.cisco.com/en/US/products/ps6307/products_configuration_example09186a00809a2d76.shtml
    Local 7 is default
    Sent from Cisco Technical Support iPhone App

  • How to download/save report from server machine to client machine?

    Hello All
    This is San,
    My problem is that i need to save pdf/html report in client machine while report running on client machine for this i have set destype as file and desformat as pdf/html.
    It is running and save automatically while report run on server machine (Application Server OS is Windows 20003 professional) but when i run it on client machine (Client machine OS is XP sp2) click on run button to run report then it give message as
    FRM-41214: Unable to run report
    When I do showjobs then it give message as
    Executed successfully but there were some errors when distribute the output<br>
    Please suggest me solution of the above mentioned.
    I am waiting for your reply.
    Thanks in Advance
    Edited by: user8752210 on Feb 11, 2011 11:46 PM

    Hello Mr.
    Thanks for quick reply.
    The e:\tempReport directory is on both app-server and client and it is shared folder, i am sending procedure that i have used as:
    PROCEDURE DOWNLOAD_AS IS
    l_success boolean;
    l_bare_filename varchar2(50);
    BEGIN
    --l_bare_filename := substr(:upload.file_name,instr(:download.file_name,'\',-1)+1);
    l_success := webutil_file_transfer.AS_to_Client_with_progress
    (clientFile => :GLOBAL.PATH3||:global.tmp--(\\client_ip_address\e:\tmpreports\file_name.html it is shared folder)
    ,serverFile => :GLOBAL.PATH2||:global.tmp--\\server_iip_address\e:\tmpreports\file_name.html it is shared folder)
    ,progressTitle => 'Download from Application Server in progress'
    ,progressSubTitle => 'Please wait'
    if l_success
    then
    message('File downloaded successfully from the Application Server');
    else
    message('File download from Application Server failed');
    end if;
    exception
         when others
         then
         message('File download failed: '||sqlerrm);
    END;
    Please suggest me what to do.
    Thanks

  • How to pick up file to Import from server instead of client PC??

    I have this code that picks up a file from client machine and processes the file . The code works fine when deployed on local tomcat deployment. But on remote server deployment , behaves differently . its looking for the file on the server How can I change the below code to look for the file on the client ??
    Please help .. any suggetion will be greately appreciated..
    Java code :
    public String importProdCredit() throws Exception {
    FileReader in = null ;
    StringTokenizer st = null;
    String record = null;
    String[] fieldValue = new String[30];
    BufferedReader br = null;
    int x = 0 ;
    FacesContext ctx = FacesContext.getCurrentInstance();
    //HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
    HttpServletRequest request = (HttpServletRequest) ctx.getExternalContext().getRequest();
    Date currentDatetime = new Date(System.currentTimeMillis());
    String StartTime = formatter.format(currentDatetime);
         int maxMemSize = 900000;
         long maxReqSize = 1000000000;
         //String fileDir = "/home/working/tmp/";
         boolean writeToFile = true;
         //String fileName = "deals.txt";
         String from = "";
         String files = "";
         String tmpStr = "";
         String comment = "";
         int num = 0;
         //     Check that we have a file upload request
         boolean isMultipart = FileUpload.isMultipartContent((HttpServletRequest) request);
         ServletOutputStream out = null;
    //     OPEN FILE
         fileName = fileName.replaceAll("\"", "\\") ;
    //     added code for export pc_
         File inputFile = new File( fileName );     
    try{     
              in = new FileReader(inputFile);
              br = new BufferedReader(in);          
         } catch (FileNotFoundException ex ) {     
              ex.printStackTrace();
              genUtils.displayError("Invalid file name or file does not exists");          
              return "-1";
    JSP:
    <%@ taglib uri="/WEB-INF/fmt-1_0.tld" prefix="fmt" %>
    <%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f" %>
    <%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h" %>
    <%@ taglib uri="/WEB-INF/c-1_0.tld" prefix="c" %>
    <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <html>
         <head>
              <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
              <META name="GENERATOR" content="IBM WebSphere Studio">
              <META http-equiv="Content-Style-Type" content="text/css">
              <LINK href='<%= request.getContextPath() + "/theme/Master.css" %>' rel="stylesheet" type="text/css">
              <link type="text/css" rel="stylesheet" href='<%= request.getContextPath() + "/theme/prodcredit.css" %>'>
              <title>Trade Ledger Ajustment Import</title>
         </head>      
    <body>
    <script language="JavaScript">
         <!--
         javascript:window.history.forward(1);
         //-->
    </script>
    <f:view>
    <h:form id="TradeAdjustmentImportForm" >
    <table width="900" class="tableform" >
    <caption class="searchcaption" > Production Credits Deals File Import : <h:messages id="Messages" errorClass="errors" globalOnly="false"/> </caption>                
    <tbody>               
         <tr class="formtr" >
              <td class="td" style="color: red"><strong>Enter File to Import</strong></td>
         </tr>
         <tr class="formtr">
              <td nowrap align="left">           
                   <h:outputText id="fileImportTxt" value="File Name : " />           
                   <h:inputText id="fileName" value="#{ProdCreditUtilities.fileName}" styleClass="field-value" />           
    </td>
         <td nowrap align="left">                          
                   <h:commandButton id="importFile" image="images/import.gif" styleClass="commandButton" action="#{ProdCreditUtilities.importProdCredit}" type="Submit" immediate="false" />               
         </td>
    <tr><td> </td></tr>                         
    </tbody>     
    </table>

    BufferedReader br = null;
    int x = 0 ;
    FacesContext ctx = FacesContext.getCurrentInstance();
    //HttpServletResponse response = (HttpServletResponse) ctx.getExternalContext().getResponse();
    HttpServletRequest request = (HttpServletRequest) ctx.getExternalContext().getRequest();
    Date currentDatetime = new Date(System.currentTimeMillis());
    String StartTime = formatter.format(currentDatetime);
    int maxMemSize = 900000;
    long maxReqSize = 1000000000;
    //String fileDir = "/home/working/tmp/";
    boolean writeToFile = true;
    //String fileName = "deals.txt";
    String from = "";
    String files = "";
    String tmpStr = "";
    String comment = "";
    int num = 0;
    // CHECK THAT WE HAVE A FILE UPLAOD REQUEST
    boolean isMultipart = FileUpload.isMultipartContent((HttpServletRequest) request);
    ServletOutputStream out = null;
    // OPEN FILE TO DO PROCESSING
    fileName = fileName.replaceAll("\"", "\\") ;
    // added code for export pc_
    File inputFile = new File( fileName );
    try{
    in = new FileReader(inputFile);
    br = new BufferedReader(in);
    } catch (FileNotFoundException ex ) {
    ex.printStackTrace();
    genUtils.displayError("Invalid file name or file does not exists");
    return "-1";
    JSP file
    <f:view>
    <h:form id="TradeAdjustmentImportForm" >
    <table width="900" class="tableform" >
    <caption class="searchcaption" > Production Credits Deals File Import : <h:messages id="Messages" errorClass="errors" globalOnly="false"/> </caption>
    <tbody>
    <tr class="formtr" >
    <td class="td" style="color: red"><strong>Enter File to Import</strong></td>
    </tr>
    <tr class="formtr">
    <td nowrap align="left">
    <h:outputText id="fileImportTxt" value="File Name : " />
    <h:inputText id="fileName" value="#{ProdCreditUtilities.fileName}" styleClass="field-value" />
    </td>
    Can you help me change this code to work with <input type="file">
    I am not that familiar with JSP and HTML . I am a database coder trying to get this fixed.
    Your help is greatly appreciated.
    Thanks
    Ricky

  • Reporting of SMS messages send from SBWP

    Hi Experts
    All users are currently able to send sms messages from SBWP using Pager function.  I am in need of a report or table were I can determine who and how many sms messages are being send.
    Regards

    Hi,
    Try with tcode SOST.
    Regards,
    Eduardo

  • No business layer sent back from server in Rich Client

    Hi,
    Whenever user tries to open a universe from Rich Client, he gets this error while webi works fine for him. What could be the issue?
    Hi Rich Client version is SAP 4.0.6.02 same as mine and mine is working fine.
    Only this particular user is affected. What could be the issue?
    Thanks for your time.

    There are several cases for this issue to occur, as per your discussion it appears to be a user/machine specific issue
    If the issue is machine specific:
    Cause: SAP Business Objects BI Platform client tools was unable to make changes in the Windows Operating system registry due to insufficient access rights of a Windows user who used to perform the installation
    Resolution:
    Log on to the host with SAP BusinessObjects BI Platform SP04 Client tools as Windows Administrator (or a member of Administrators group)
    Launch Web Intelligence Rich Client application
    This will make entries in windows registry, further you will not get the error
    It the issue is user specific: That is this user will get the specified error across all client machines for the give scenario
    Cause:
    Insufficient rights to the user/group on Universe Connection
    Resolution:
    Login to Central Management Console (CMC) using Enterprise Administrator.
    Navigate to Connections.
    Grant User/Group 'View on Demand' Access level to the Connection on which the Universe is to be created.
    Login to the BI Launchpad with the user and create New Webi report.

  • Sending from server A using account on SMTP server B

    I'm currently writing a web-based e-mail application, for which I would like to have POP3 and SMTP capability. I have the POP3 section working - that's not a problem.
    The question I have has to do with SMTP. What I would LIKE to have users do it define an 'account' with my application that would allow them to use their ISP's e-mail account settings to send mail through my application on my hosting service's servers.
    Is this possible? I'm getting "Connection refused" messages, and I'm now beginning to wonder how or if I'll be able to do this. If I CAN'T do this, then how do applications like Outlook do it? How about other web-based e-mail like Yahoo! Mail?
    Bob

    you probebly get relaying problems. security issue you shouldn't be able to get around it.

  • Sending XML messages from server to client using POST method

    Dear everyone,
    I have a simple client server system - using Socket
    class on the server side and URLConnection class on
    the client side. The client sends requests to the
    server in the form of an XML message using POST method.
    The server processes the request and responds with
    another XML message through the same connection.
    That's the basic idea.
    I have a few questions about headers and formats
    especially with respect to POST.
    1. In what format should the response messages from the
    server be, for the client? Does the server need to
    send the HTTP headers - for the POST type requests?
    Is this correct?:
       out.println("HTTP/1.1 200 My Server\r");
       out.println("Content-type: text/xml\r");
       out.println("Content-length: 1024\r");
       out.println("\r");
       out.println("My XML response goes here...");2. How do I read these headers and the actual message
    in the client side? I figured my actual message was
    immediately after the blank line. So I wrote
    something like this:
       String inMsg;
       // loop until the blank line is through.
       while (!"".equals(inMsg = reader.readLine()))
          System.out.println(inMsg);
       // get the actual message and process it.
       inMsg = reader.readLine();
       processMessage(inMsg);But the above did not work for me. Because I seem to
    be receiving a blank line after each header! (I suppose
    that was because of the "\r".) So what should I do?
    3. What are the different headers I must pass from
    server to the client to safeguard against every
    possible problem?
    4. What are the different exceptions I must be prepared
    for this situation? How could I cope with them? For
    example, time outs, IOExceptions, etc.
    Thanks a lot! I appreciate all your help!
    George

    hello,
    1) if you want to develop a distributed application with XML messages, you can look in SOAP.
    it's a solution to communicate objects distributed java (or COM or other) and it constructs XML flux to communicate between them.
    2) if it can help you, I have developed a chat in TCP/IP and, to my mind, when you send datas it's only text, so the format isn't important, the important is your traitement behind.
    examples :
    a client method to send a message to the server :
    public void send(String message)
    fluxOut.println(message);
    fluxOut.flush();
    whith
    connexionCourante = new Socket(lAdresServeur, noPort);
    fluxOut= new PrintWriter( new OutputStreamWriter(connexionCourante.getOutputStream()) );
    a server method in a thread to receive and print the message :
    while(true)
    if (laThread == null)
    break;
    texte = fluxIn.readLine();
    System.out.println(texte);
    that's all ! :)
    If you want to use it for your XML communication, it could be a good idea to use a special message, for example "@end", to finish the server
    ex :
    while(true)
    if (laThread == null)
    break;
    texte = fluxIn.readLine();
    // to stop
    if (texte.equals("@end"))
    {break;}
    processMessage(texte );
    hope it will help you
    David

Maybe you are looking for

  • Could not find the main class: oracle.ide.boot.Launcher.  Program will exit

    Hi, I have installed Oracle11g_win64_11gR1, Database and Client. The issue is unable to invoke "sqldeveloper", getting the following error message. Could you please help ? FYI. I have already downloaded and installed installed JRE and JDK. ie. C:\Pro

  • How to insert a new column in SQ00

    Hi, someone knows how i can insert a new blank column in a query? i have to do that in a query or in a InfoSet?? thanks to all Ale

  • Before Mountain Lion and Aperture 3.4 Iphoto libraries would show up as a project.  Can I still have this feature?

    Before Mountain Lion and Aperture 3.4 Iphoto libraries would show up as a project.  Can I still have this feature?  I want to keep my iphoto libraries on another drive but now it appears the only way I can have Aperture search all libraries for a pho

  • Cannot save files or preferences

    I'm getting the USheetSelection.cpp : 260 : REQUIRE failed in the error log and I can't save anything I haven't changed anything but my list of recent files has disapearred CS6 extended photohop not working I have reset the preferences file but it st

  • OIM 9.1 on RHEL 5.X

    Has anyone got any experience of running OIM 9.1 on RHEL 5.X? I know it is not certified yet but perhaps someone has tested this anyway? Has anyone got any information from Oracle about when OIM 9.1 will be certified on RHEL 5.X? Best regards /M