Check the response of your request that APE give you back.

Le 25/02/2011 15:14, Summer nguyen a écrit :
P.S:  I use Controller in Demo. It works !!!,
How would I fix it. Thank you

On Fri, Feb 25, 2011 at 9:11 PM, Summer nguyen <[email protected] <mailto:[email protected]>> wrote:

    Thank you so much.
    btw, I have a question with inlinepush:

    I use Java to push to APE Server,
    Here is my code :

                JSONObject obj2 = new JSONObject();
                obj2.put("hehe", "hoho");
                JSONObject obj1 = new JSONObject();

                obj1.put(new String("password"), new
    String("testpasswd"));
                obj1.put("raw", "raw");
                obj1.put("channel","product");
                obj1.put("data", obj2);

                JSONObject obj = new JSONObject();
                obj.put("cmd", "inlinepush");
                obj.put("params",obj1);


                System.out.println(obj);
String URLs = server +URLEncoder.encode("["+obj.toString()+"]");


    // PUSH to inlinepush

                   java.net.URL url = null;
                    url = new java.net.URL(URLs);
                    URLConnection connection = url.openConnection();
                    connection.connect();

    Here is the URL I get before encoding: *
    http://192.168.1.199:6969/0/?[{
    
<http://192.168.1.199:6969/0/?[%7B>"cmd":"inlinepush","params":{"raw":"raw","data":{"hehe":"hoho"},"channel":"product","password":"testpasswd"}}]*
    and After encoding:
    
http://192.168.1.199:6969/0/?%5B%7B%22cmd%22%3A%22inlinepush%22%2C%22params%22%3A%7B%22raw%22%3A%22raw%22%2C%22data%22%3A%7B%22hehe%22%3A%22hoho%22%7D%2C%22channel%22%3A%22product%22%2C%22password%22%3A%22testpasswd%22%7D%7D%5D



    But, inlinepush dont catch that comand. Please tell me why. Thank
    you very much,

    On Fri, Feb 25, 2011 at 4:45 PM, <[email protected]
    <mailto:[email protected]>> wrote:

        Hey,

        Indeed you can, for instance, store what you want in "Ape." or
        simply in
        the global namespace by declaring the variable out of a function.

        Anthony

        On Fri, 25 Feb 2011 16:17:03 +0700, Summer nguyen
        <[email protected] <mailto:[email protected]>> wrote:
        > Dear,
        > I want to do something like this :
        >
        > I have Java App to push infomation to APE Server (using
        inlinepush).
        > I want inlinepush Ape Server Store infomation in somewhere (
        like  a
        > global variable) instead of  forwarding the infomation to
        all user in
        > the channel.
        >  Then, I use APE Server to send responds to client using the
        infomation
        > store in the global variable.
        > Note: each client request a part of the infomation.
        >
        > Example :
        > Java Push the infomation:
        > {'a':1, 'b':2, 'c':3};
        >  Then APE inpushline store this infomation to a global variable.
        > APE use the infomation stored in the global variable to send
        to clients
        > :
        > Client 1:  send  only :  'a':1 ,
        > Client 2: send only :  'b':2,
        >  Client 3:  send only 'c':3
        >
        > Do you have any ideas ?. Thank you very much
        >
        >  --
        >  You received this message because you are subscribed to the
        Google
        >  Groups "APE Project" group.
        >  To post to this group, send email to
        [email protected] <mailto:[email protected]>
        >  To unsubscribe from this group, send email to
        > [email protected]
        <mailto:ape-project%[email protected]>
        >  For more options, visit this group at
        > http://groups.google.com/group/ape-project?hl=en [1]
        >  ---
        >  APE Project (Ajax Push Engine)
        >  Official website : http://www.ape-project.org/ [2]
        >  Git Hub : http://github.com/APE-Project/ [3]
        >
        >
        > Links:
        > ------
        > [1] http://groups.google.com/group/ape-project?hl=en
        > [2] http://www.ape-project.org/
        > [3] http://github.com/APE-Project/

        --
        You received this message because you are subscribed to the Google
        Groups "APE Project" group.
        To post to this group, send email to
        [email protected] <mailto:[email protected]>
        To unsubscribe from this group, send email to
        [email protected]
        <mailto:ape-project%[email protected]>
        For more options, visit this group at
        http://groups.google.com/group/ape-project?hl=en
        ---
        APE Project (Ajax Push Engine)
        Official website : http://www.ape-project.org/
        Git Hub : http://github.com/APE-Project/



--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to