Analysis of response of HttpConnection

Hello! I have the same problem as in this thread
http://supportforums.BlackBerry.com/T5/Java-development/parsing-response-of-HttpConnection/m-p/13985...
When I use this code:

httpConn = GetConnection(_url);
responseCode = httpConn.getResponseCode();
if(responseCode == 200)
{
    is = httpConn.openInputStream();
    StringBuffer stringBuffer = new StringBuffer();
    byte[] byteArr = null;

    int ch;
    while ((ch = is.read()) != -1) {
            stringBuffer.append((char)ch);
    }
}

I get in stringBuffer:

«Ð\u009FÑ\u0080емиÑ\u008F Ð Ñ\u0083неÑ\u0082а 2011»

Ð\u0092 Ð\u009CоÑ\u0081кве Ñ\u0081оÑ\u0081Ñ\u0082оÑ\u008FлаÑ\u0081Ñ\u008C Ð\u0092оÑ\u0081Ñ\u008CмаÑ\u008F Ñ\u0082оÑ\u0080жеÑ\u0081Ñ\u0082веннаÑ\u008F Ñ\u0086еÑ\

I applied the advice of Peter and with this code

httpConn = GetConnection(_url);
responseCode = httpConn.getResponseCode();
responseMessage = httpConn.getResponseMessage();
if(responseCode == 200)
{
    is = httpConn.openInputStream();

    StringBuffer stringBuffer = new StringBuffer();
    byte[] byteArr = null;
    byteArr = new byte[1];
    int readIn = 0;

    while((readIn = is.read(byteArr)) > 0) {
            String temp = "";
            try {
                 temp = new String (byteArr, 0, readIn, "UTF-8");
            } catch (Exception e) {
               e.printStackTrace();
            }
        stringBuffer.append(temp);
}

I get this:

2011

\r
\n2011.

As you can see, he "ate" all characters, except the numbers and English letters, but I read all of the characters, of course.

So how can receive this content as a String or byte array without losing characters?

Replace this:

StringBuffer stringBuffer = new StringBuffer();
Byte [] byteArr = null;
byteArr = new ubyte [1];
Int read = 0;
               
While ((read = is.read (byteArr)) > 0) {}
String temp = "";
try {}
Temp = new String (byteArr, 0, reading, 'UTF-8');
} catch (Exception e) {}
e.printStackTrace ();
}
stringBuffer.append (temp);

}

with something like

Byte [] responseBytes = IOUtilities.streamToByte (is);

String responseString = new String (responsebytes, "UTF - 8");

It's not good, there's a try catch missing on the one hand, but you get the idea.

If you then take the data to a parser that takes a stream, then only convert the bytes into a string, instead feeding in a ByteArrayinputStream using responseBytes (again, I probalby had it wrong, but you get the idea).

I think it should overcome your problems.

Tags: BlackBerry Developers

Similar Questions

  • Response of HTTPConnection JSON server at BB on Wifi

    Hey there,

    I created a class that extends from the Thread:

    • Connect Wifi to my Tomcat server.
    • Request (GET method) of a resource (JSON object) on the server.
    • Lire read in response, and then analyze the JSON.

    The connection is successfully established, the response is read and then comes the analysis that is the problem. Apparently he received the JSON response in a bad shape. I think the problem is with the synchronization of threads, because I'm trying to use this response to build the user interface after the analysis.

    Here is the code:

    Class WifiThread:

    public class WifiThread extends Thread {
    
      private String _url;  private String _response; private String _interface = ";interface=wifi";
    
       public ConnectionThread(String url) {  this._url = url;   }
    
       public void run() {        HttpConnection conn = null;        InputStream in = null;        int code;
    
             try {
    
                       conn = (HttpConnection) Connector.open(this._url + this._interface, Connector.READ);            conn.setRequestMethod(HttpConnection.GET);
    
                code = conn.getResponseCode();
    
                if (code == HttpConnection.HTTP_OK) {                in = conn.openInputStream();                ByteArrayOutputStream out = new ByteArrayOutputStream();
    
                    byte[] buffer = new byte[in.available()];                int len = 0;
    
                    while (-1 != (len = inputStream.read(buffer))) {                    out.write(buffer);                                   }
    
                    out.flush();                this._response = new String(out.toByteArray());
    
                    System.out.println(this._response);
    
                    if (out != null){                    out.close();                }                if (in != null){                    in.close();                }                if (conn != null){                    conn.close();                }            }
    
            } catch (Exception e) {            System.out.println("HTTP Thread: " + e.toString());            throw e;        }   }  
    

    That's how his name:

    public myApp extends UiApplication {
    
        public myApp() {
    
              String url = "http://[IP.Address]:[Port]/[Resource]"          WifiThread thread = new WifiThread(url);          thread.start();          thread.run();
    
              String response = thread.get_response();
    
              // Parse JSON string:          JSONObject jsonObj = MyParser.fromJSON(response);
    
              // Create UI          // ...
    
        }}
    

    Any help would be great. Thank you!

    I've seen this code before:

    ByteArrayOutputStream out = new ByteArrayOutputStream();
    ubyte [] buffer = new byte [in.available ()];
    int len = 0;
    {While (-1! = (len = {inputStream.read (buffer)))}
    out. Write (buffer);
    }
    out. Flush();
    This ._response = new String (out.toByteArray ());

    Can you tell me where you got it.  I want to see if I have removed it because I think that it is inefficient and made assumptions about the encoding.

    I suspect that you are sent a stream of UTF-8 bytes, in which case you can replace the above with something like:

    Byte [] responseBytes is (in) IOUtilities.streamToBytes;.

    try {}

    This ._response = new String (responseBytes, "UTF - 8");

    catch (Exception e) {}

    throw new RuntimeException ("unexpected decoding error:" + try);

    }

    If you have additional problems can empty you out the json using something like:

    System.out.println (this._response);

    and review to ensure that it matches what you expect and are Json valid.

    I hope this helps.

  • 404 response code httpconnection

    Hello everyboy,

    can someone tell me why this code returns the message 404 with the majority of URLs, but when I use a rest Client, the same URL works normally and returns a 200 OK response code

    public class ServiceRequestThread extends Thread {
        protected String _URL;
        protected HTTPBasicsMainScreen _Dest = null;
        public ServiceRequestThread(String URL, HTTPBasicsMainScreen screen){
         super();
        _Dest = screen;
        _URL = URL
    
        }
    
        public void run()
        {
        try
        {
    
        HttpConnection conn = (HttpConnection)
        Connector.open(_URL+";deviceside=true;", Connector.READ);
        conn.setRequestMethod(HttpConnection.GET);
    
         int responseCode = conn.getResponseCode();
    
        if (responseCode != HttpConnection.HTTP_OK)
        {
        InputStream data = conn.openInputStream();
        StringBuffer raw = new StringBuffer();
        byte[] buf = new byte[4096];
        int nRead = data.read(buf);
    
        while (nRead > 0)
        {
        System.out.println("nread :"+nRead);
        raw.append(new String(buf,0,nRead));
        nRead = data.read(buf);
        }
        _Dest.updateDestination(raw.toString());
        }
    
        else
        {
    
        _Dest.updateDestination("responseCode="+
        Integer.toString(responseCode));
        }
        }
    
        catch (IOException e)
        {
        e.printStackTrace();
        _Dest.updateDestination("Exception:"+e.toString());
        }
        }
    }
    

    Thanks in advance

    Hi peter_strange

    I want to thank very you much for your help, it works now, the problem comes from the semicolon back.

    now, everything's fine.

  • How to make httpconnection and get the xml response using httpconnection in post method.

    Hello

    I am new to the blackberry web work,

    I want to make httpconnection using the post method and also pass a parameter related to my url.

    This function returns xml data.

    How can I perform this task.

    Please help me if anyone has a solution...

    I have soved that problem myself.

  • Analysis of response time of NAM

    I have 2 small question:

    First: How Cisco NAM can calculate server, client and network responses while it is not the initiator of the traffic? It is based on the timestamps in data packets? All protocols put a timestamp in the header?

    The second question is: how NAM classify clients and servers? as I see the servers appear as a customer.

    Thanks in advance.

    Performance (IAP) intelligent application monitoring is a key feature that provides the Nam: an ability to measure the response time of the transactions between the client and the server.

    NAM monitors the flow of TCP packets between the client and the server and data response time to bring more visibility in time of response measures (ART) and the latency of the network.

    Next image will share more details:

    NAM request time response (it shows a representation of the total time of the operation as opposed to application response time)


    Transaction time / response time measurements (lists and describes measures ART measured by NAM)

    Possible NAM monitors conversation and the TCP packet flow between applications/server customers and where it grows the clients and servers.

    -Thank you

    Vinod

    To encourage contributors. RATE besoin.*

  • Format analysis of the measurement data of variable length for Newport THP/N

    I try to analyse the response of a sensor of zED-THP/N of Newport. The answer is back with ID SEQ TYPE TEMP C HUMD %.

    ID = 1, SEQ is constantly changing, TYPE = 15, temperature = nnn.n

    I am trying to capture the Temp, and this presented a challenge. (The humidity is easy, I'm reading after the C - 5 has 'C')

    The SEQ number starts as n and evolves to nnnn... so using 7x4a does not work due to the changing length of the SS.

    When I use '15' 4, because the Type is still 15, and SEQ contains a 15 in the number, which also becomes a problem.

    Everything that I have which is constant is that there are spaces between each value and the value of temperature I'm looking begins after the 3rd space.

    Any help would be great

    David Sandelman

    Great... progress is good.

    If you use the single command, tol ERDG00A return all my sensors in a given request:

    The request channel data that must be completed is channel 0. All other channels should be empty. Not \r, just empty. I should have mentioned that in the original post. Then configure the channels as before, ensure that each channel of moisture is a\r\n. The next channel group must be a\x20.

    To explain, just one tells DASYLab to find the number of variable length, and he still needs a delimiter to put end. many devices use a comma, but they use a space. The hexadecimal ASCII for space is 20, so say us DASYLab to find numbers in a string of ASCII and stop when he finds a space, using the notation of DASYLab to hexagonal \x20.  notation for the carriage return character (\r isor hex 15), and \n is the notation for the line break ( or hex 12).

    15 84 0 18.5 C 64.5%
    1 50 15 C 18.4, 64.2%
    2 214 15 18.5 C 64.7%
    3 237 15 18.3 C 64.3%

    I like the idea of a single data request command for all four channels - less necessary communication protocol. In interpreting the device number, you will be able to ensure that the analysis works correctly.

    CH 0: a\x20

    CH 1: a\x20

    CH 2: a\x20

    CH 3: a\x20

    CH 4: a\r\n

    CH 5: a\x20

    CH 6: a\x20

    CH 7: a\x20

    CH 8: a\x20

    CH 9: a\r\n

    CH 10: a\x20

    CH 11: a\x20

    CH 12: a\x20

    CH 13: a\x20

    CH 14: a\r\n

  • How to build a parser of vector signals PXI using different module combinations

    Normal
    0

    21

    fake
    fake
    fake

    PT - BR
    X NONE
    X NONE

    MicrosoftInternetExplorer4

    / * Style definitions * /.
    table. MsoNormalTable
    {mso-style-name: "Table normal";}
    MSO-knew-rowband-size: 0;
    MSO-knew-colband-size: 0;
    MSO-style - noshow:yes;
    MSO-style-priority: 99;
    MSO-style - qformat:yes;
    "mso-style-parent:" ";" "
    MSO-padding-alt: 0 cm 0 cm 5.4pt 5.4pt;
    MSO-para-margin-top: 0 cm;
    MSO-para-margin-right: 0 cm;
    MSO-para-margin-bottom: 10.0pt;
    MSO-para-margin-left: 0 cm;
    line-height: 115%;
    MSO-pagination: widow-orphan;
    font-size: 11.0pt;
    font family: 'Calibri', 'sans-serif ';
    MSO-ascii-font-family: Calibri;
    MSO-ascii-theme-make: minor-latin;
    MSO-hansi-font-family: Calibri;
    MSO-hansi-theme-make: minor-latin;
    mso-fareast-language: EN-US ;}

    Normal
    0

    21

    fake
    fake
    fake

    PT - BR
    X NONE
    X NONE

    MicrosoftInternetExplorer4

    / * Style definitions * /.
    table. MsoNormalTable
    {mso-style-name: "Table normal";}
    MSO-knew-rowband-size: 0;
    MSO-knew-colband-size: 0;
    MSO-style - noshow:yes;
    MSO-style-priority: 99;
    MSO-style - qformat:yes;
    "mso-style-parent:" ";" "
    MSO-padding-alt: 0 cm 0 cm 5.4pt 5.4pt;
    MSO-para-margin-top: 0 cm;
    MSO-para-margin-right: 0 cm;
    MSO-para-margin-bottom: 10.0pt;
    MSO-para-margin-left: 0 cm;
    line-height: 115%;
    MSO-pagination: widow-orphan;
    font-size: 11.0pt;
    font family: 'Calibri', 'sans-serif ';
    MSO-ascii-font-family: Calibri;
    MSO-ascii-theme-make: minor-latin;
    MSO-hansi-font-family: Calibri;
    MSO-hansi-theme-make: minor-latin;
    mso-fareast-language: EN-US ;}

    I understand
    Vector signal analyzers OR consist of 2 or 3 separate PXI modules: 1
    digitizer, 1 buck converter of RF frequencies and 1 generator of signals (model 5663).

    1. can I use digitizer and signal
    generator general purpose oscilloscope and generator of signals separately?

    2 may I build my own VSA by choosing
    different combinations of scanners and the signal generators? Or replace the signal
    generator by an arbitrary signal generator?

    3.       I
    intend to buy a digitizer/oscilloscope and an arbitrary signal generator
    analysis of response of frequency on the transformers. Later I plan to
    buy a step-down converter frequency and build a vector signal Analyzer. Is this possible?

    Hello

    The frequency IF the 5660 and 5661 (it's the same thing) is 15 MHz, with an instantaneous bandwidth of 20 MHz. The difference between the 5660 and the 5661 is located in the digitizer that accompanies it. The 5660 uses the PXI-5620 digitizer that has a sampling rate 64 MECH. / s and a buck converter of digital frequency limited to 1.25 MHz of bandwidth. The 5661 uses the digitizer PXI-5142, giving you a MECH 100. / s rate and a PSO allowing digital downconversion circuit and the decimation of the full bandwidth of 20 MHz.

    The common comment in the SBA above is the RF PXI-5600 frequency step-down converter which is a superheterodyne architecture of three floors. OL is for the three stages of this module are auto-approvisionnées in their own country. The architecture of several step allows for rejection of the improved image and filtering at the expensive of a noise floor slightly higher due to the signal path more complex. There also an OCXO on board, this gives him a time reference more precise - noise reduction phase etc. The PXI-5600 by itself is wide from three locations.

    The SMU-5601 since SMU-5663 step-down is designed based on the single frequency step-down converter and resumes from a single location. The celled frequency step-down converter gives you improved noise floor characteristics and a better dynamic range, with the rejection of the image fees, having does not simply because there is only one step. The LO is provided by an external module in this case for several reasons. Have a separate external LO allows more modularity in your system, as well as the ability to share a single LO generator between several vendor-specific attributes. This opens the possibility of MIMO applications. The internal of the NI PXI-5600 LOs are not shareable and therefore cannot be synchronized between several PXI-5600 s. The PXI-5663 (all three modules) takes up the same amount of space in the slot as a single NI PXI-5600 without a digitizer.

    The PXI-5154 is indeed a powerful scanner, given its instantaneous bandwidth of 1 GHz. Remember, however, that the connector Active Directory on this digitizer is 8 bits, compared to the 5622 which is 16-bit. If you need more resolution is of course entirely depends on your application. The PXI-5600, as SMU-5601 is controllable as a buck converter stand-alone frequency using the DAMA API OR. You will need to program your application with the scope API for use with PXI-5154 OR and the API de DAMA. A few other caveats to note is that there is no PSO on the PXI-5154 so you can't enjoy the Equalization filter to correct the frequency of the NI PXI-5600 response. Also, as I mentioned above, the frequency of YEW of the NI PXI-5600 has 15 MHz with a bandwidth of 20 MHz - processor 1 GHz bandwidth on your digitizer will be somewhat of an overdose of the IF signal.

    While you're dead on with the advantage of modularity, I would take the time to really meet your search application and ensure that different choices of module and their combinations to meet these needs.

    Hope that helps!

  • Games on the Internet give the error "a network error occurred during communication with the game server. "Error code: 0 x 80041006.

    I ran the System File Checker tool analysis. Response has been no problem with the configurations. Also, I did uninstall and reinstall. I keep getting the message: "a network error occurred during communication with the game server. "Error code: 0 x 80041006 ' this error message occurs on all the computers I own.

    Actually, no, the answer in the links were also less than helpful... suggested this, that.  Things that I had already done b4 posting my question.
    More funny: after that I posted my comment about the fault is not not in my machine and those of thousands of others, but in MS, spades servers suddenly started working again.  Coincidence? No doubt, but still...

  • Analyze the Mac address with the regular expression matching

    Hello world

    I have a problem with the function of regular expression matching,

    I try to analyse the response both a query arp - a 192.168.0.15 to retrieve the MAC address of the remote IP address, I used the following regular expression: ^ ([0-9a-fA-F]{2}[:-]){5}([0-9a-fA-F]{2})$

    I wonder why should I do a subset of the first string to extract only the part of the MAC address. The regular Expression function is not able to recognize the regular expression directly in the middle of a string?

    I only works when I extracted the subset of tring right as in the picture below.

    Thanks for your replies.

    Get rid of the "^" at the beginning of your regular expression. You are ordering him to find the model at the beginning of the string.

  • Windows xp media center SP3

    1. How can I find What Edition is my windows xp Media Center

    2. How can I find what rollup I have

    3 edition / Version mean the same thing ?

    In order to download updates from the microsoft site I downloaded

    SP3 for IT PRO  I think that some updates are only for SA Pro

    and also settle on my pc, how do I know that updates do not to install

    4. is there a way to install the correct sp3

    5. firewall Windows turns off and onn it self How can I avoid that these, or

    How to know what causes these

    1. go to start, right click on my computer and choose Properties, your operating system and version will be on the general tab.

    2. go to start, Control Panel, add/remove, keep an eye on the top is checked to show updates, but what rollup looking to what program or one application, please be more specific.

    3 Media Center Edition is the operating system not the version name.

    4. If sp3 is not installed through Microsoft Update, download, because it's good to download, just ignore that it is for a COMPUTER technician.

    5 depends on, what is your current antivirus? You have another firewall installed? Are you infected?

    6. make sure that your system is clean:

    Download, install, update and scan with these full free malware detection programs:

    Malwarebytes (MMFA): http://www.malwarebytes.org/products/malwarebytes_free

    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    7. click on start, run and in the type box:

    Msinfo32

    Click OK, and when the system info summary appears, click on edit, select all (Ctrl-A), copy (Ctrl-C) and paste (Ctrl-V) the information back here in your next reply.

    You can change the personal information.

    After back with the results of the analyses and responses to above information.

    8. all updates will be correct if you go to Microsoft Update and do a scan of high priority, then you can do a custom scan and install the rootkit under optional updates updates. Do not download updates of material under option, if you need to update a driver go to the manufacturer's Web site.

  • Problem with SENDING Push notifications!

    Portage .apk to .bar (apk2bar) and I need to send push messages to the device (Dev Alpha B)

    but I can´t find code limit and the error of result of the sender.

    This my PHP server sender:

    public function sendNotificationBlackBerry ($registatoin_tokens, $message) {}
    $appid = 4038-8si785997a3eir572168c5f821291rl8a84';
    $password = "Ja50N4Hu1d";
    $boundary = "mPsbVQo0a68eIL3OAxnm";
    $appport = "33664;
    $deliverbefore = gmdate ("Y - m - d\TH:i:s\Z", strtotime ('+ 2 minutes'));

    An array of addresses must be in the form of PIN or "push_all".
    $addresses = ";
    foreach ($registatoin_tokens as $value) {}
    $addresses. = '

    ' ;
    }
    Create a new cURL resource
    $ch = function curl_init();
    $messageid = true (true);

    $data = '-'. $boundary. "\r\n".
    '
    http://www.openmobilealliance.org/tech/DTD/pap_2.1.DTD">

    '
    . $addresses.
    '

    ' . "\r\n".
    '--' . $boundary. "\r\n".
    "Content-Type: text/plain". "\r\n". "
    "Push-Message-ID: '." $messageid. "\r\n\r\n".
    stripslashes ($message). "\r\n".
    '--' . $boundary. '--' . « \n\r » ;

    set the URL and other appropriate options
    curl_setopt ($ch, CURLOPT_URL, "https://pushapi.eval.blackberry.com/mss/PD_pushRequest"); //Erro 2000 code request is not valid.
    curl_setopt ($ch, CURLOPT_URL, "https://cpXXXX.pushapi.eval.blackberry.com/mss/PD_pushRequest"); / / Error CODE: 2000
    curl_setopt ($ch, CURLOPT_URL, "https://pushapi.eval.blackberry.com"); / / not valid end of document
    curl_setopt ($ch, CURLOPT_URL, "https://cpXXXX.pushapi.eval.blackberry.com"); //Invalid end of document

    curl_setopt ($ch, CURLOPT_HEADER, false);
    curl_setopt ($ch, CURLOPT_USERAGENT, "SAA push application");
    curl_setopt ($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt ($ch, curlopt_buffersize, CURLAUTH_BASIC);
    curl_setopt ($ch, CURLOPT_USERPWD, $appid. ':' . $password);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($ch, CURLOPT_HTTPHEADER, array ("Content-Type: multipart/related;")) Boundary =". $boundary. "; type = application/xml"," Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q =. 2 "," connection: keep-alive "));

    recovery URL and pass it to the browser
    $xmldata = curl_exec;
    curl_close ($ch);

    //-----------------------------
    Start the analysis of response output and the XML that we can read
    $p = xml_parser_create();
    xml_parse_into_struct ($p, $xmldata, $vals);
    $errorcode = xml_get_error_code ($p);
    If ($errorcode > 0) {}
    $err = true;
    }
    xml_parser_free ($p);

    echo ' Our PUSH-ID: '. $messageid. "
    \n » ;
    If (! $err & $vals [1] ['tag'] == 'PUSH-RESPONSE') {}
    echo ' PUSH-ID: '. $vals [1] ['attributes'] ['PUSH-ID']. "
    \n » ;
    echo ' RESPONSE TIME: '. $vals [1] ['attributes'] ['RESPONSE TIME']. "
    \n » ;
    echo ' response CODE: '. $vals [2] ['attributes'] ['CODE']. "
    \n » ;
    echo ' response DESC: '. $vals [2] ['attributes'] ['DESC']. "
    \n » ;
    } else if ($err) {}
    echo '

    An XML parser error occurred

    ' . "\n";
    echo '
    ' . xml_error_string($errorcode) . "
    \n » ;
    echo '

    Response

    ' . "\n";
    echo '
    ' . $xmldata . '
    ' . "\n";
    } else {}
    echo '

    An error has occurred

    ' . "\n";
    echo ' fault CODE: '. $vals [1] ['attributes'] ['CODE']. "
    \n » ;
    echo ' error DESC: '. $vals [1] ['attributes'] ['DESC']. "
    \n » ;
    echo '
    ' . $xmldata . '
    ' . "\n";
    var_dump ($XMLDATA);
    }
    // -----------------------------

    Return $xmldata;
    }

    Try adding a blank line between the "Content-Type: text/html" line and your actual payload data. It seems that the system expects all the headers to be included in the estate, then a space, then the payload.

  • sending request giving 401 unauthorized error in Twitter

    Hi am using the following code to update my status in twitter, but gives a 401 unauthorized error

    can any one help on this... its urgency.

    Thank you

    cordially yakubpasha

    Sub update (String username, String password, string status) throws IOException {}
    String response = null;
    HttpConnection connection = null;

    /*
    * ask a String upadte my status
    */
    String query = "status =" + urlEncode (status);
    String length = String.valueOf (query.length ());
            

    /*

    * username and password code here
    */

    String userPass = username + ":" + password;
    Byte [] encrypted = Base64OutputStream.encode (userPass.getBytes (), 0,
    userPass.length (), false, false);
    String url = "https://twitter.com/statuses/update.xml";
                 
    try {}
    Connection = (HttpConnection) Connector.Open (URL);
    connection.setRequestMethod (HttpConnection.POST);
    connection.setRequestProperty ("User-Agent", "profile/MIDP-2. ("0 configuration/CLDC - 1.0");
    connection.setRequestProperty ("Content-Type", "application/x-www-formulaires-urlencoded");
    connection.setRequestProperty ("authorization", "Basic" + new String (encoded));
    connection.setRequestProperty("Content-Length",length);
                
    //
    connection.setRequestProperty ("Content-Length", len);
    OutputStream os = connection.openOutputStream ();
    OS. Write (u.GetBytes ());
    Dialog.Alert ("" + Connection.getResponseCode () + Connection.getResponseMessage ());
    If (connection.getResponseCode () == HttpConnection.HTTP_OK) {}
    StringBuffer buffer = new StringBuffer();
    InputStream is = connection.openInputStream ();
    int c;
                    
    ("Connection") Dialog.Alert;
    While ((c = is.read (())! = - 1) {}
                        
    buffer. Append ((Char) c);
                        
    }
    is. Close();
    response = buffer.toString ();
    Dialog.Alert (Response);
    }
    } catch (Exception ex) {}
    Dialog.Alert ("error message");
    System.out.println ("sdcfsdfsdfs" + ex.getMessage ());
    } {Finally
    If (connection! = null) {}
    try {Connection.Close ;}
    catch (IOException ext) {}
    }
    }
    }

    Hey I made with her...

    If any want to post a status lets you next...

    its works perfectly

    Sub update (String username, String password, string status)
    throws IOException {}
    String response = null;
    HttpConnection connection = null;

    String query = "status =" + urlEncode (status);
    String length = String.valueOf (query.length ());

    String userPass = username + ":" + password;
    Byte [] credentialsBytes = (username + ":" + password) .getBytes ();
    Byte [] encodedBytes = Base64OutputStream.encode (credentialsBytes, 0,)
    userPass.length (), false, false);
    String credentialString = new String (encodedBytes);

    String url = "https://twitter.com/statuses/update.xml";
        
    try {}
    connection = (HttpConnection), Connector.open (url);
    connection.setRequestMethod (HttpConnection.POST);

    connection.setRequestProperty ("Content-Type",
    "application/x-www-formulaires-urlencoded");
    connection.setRequestProperty ("authorization", "Basic"
    (+ credentialString);
    connection.setRequestProperty ("Content-Length", length);
    DataOutputStream out = new DataOutputStream (connection
    (. openDataOutputStream());
    out. Write (Query.GetBytes ());
    out. Flush();
    out. Close();
    If (connection.getResponseCode () == HttpConnection.HTTP_OK) {}
    StringBuffer buffer = new StringBuffer();
    InputStream is = connection.openInputStream ();
    int c;

    ("Connection") Dialog.Alert;
    While ((c = is.read (())! = - 1) {}

    buffer. Append ((Char) c);

    }
    is. Close();
    response = buffer.toString ();
    Dialog.Alert (Response);
    }
    } catch (Exception ex) {}
    Dialog.Alert ("error message");
    System.out.println ("sdcfsdfsdfs" + ex.getMessage ());
    } {Finally
    If (connection! = null) {}
    try {}
    Connection.Close;
    } catch (IOException ext) {}
    }
    }
    }
    }

    This code I copied from somewere am thanking him for sharing this code snippet
    public static String urlEncode(String s) {}
    If (s! = null) {}
    try {}
    s = String (new s.getBytes("UTF-8"), 'ISO-8859-1');
    } catch (UnsupportedEncodingException e) {}
    }
    StringBuffer tmp = new StringBuffer();
    try {}
    for (int i = 0; i)< s.length();="" i++)="">
    int b = (int) s.charAt (i);
    If ((b > = 0 x 30 && b <= 0x39)="" ||="" (b="">= 0 x 41 && b))<=>
    || (b > = 0x61 & b)<= 0x7a))="">
    tmp. Append ((Char) b);
    } Else if (b == 0x20) {}
    tmp. Append("+");
    } else {}
    tmp. Append ("%");
    If (b<= 0xf)="">
    tmp. Append ("0");
    }
    tmp. Append (Integer.toHexString ((b));
    }
    }
    } catch (Exception e) {}
    }
    Return tmp.toString ();
    }
    Returns a null value.
    }

  • BIS push registration for lack of client app

    Hi all

    I'm trying to implement the push BIS service in the client application.

    I got the Port number, appId, BPA URL & using that i'm trying to register using the code below

    public boolean registerBpas() {}

    Logger.info ("MyScreen.registerBpas ()");
    /**
    As the suffix of the connection is fixed I just use a Thread to call the code of connection
    *
    **/

    isValue Boolean = false;
           
    try {}
    Logger.info ("-step 1");
    String conparam = getConnParam();
    Logger.info ("---> conparam:" + conparam);
    final String registerUrl = formRegisterRequest (null, BPAS_URL, APP_ID), + conparam / * Conn.getConnectionParameters () * /;
    Logger.info ("\n\n\n msg registerBPAS URL is:" + registerUrl);
    HttpConnection httpConnection = (HttpConnection), Connector.open (registerUrl);
    InputStream is = httpConnection.openInputStream ();
    Response string = new String (IOUtilities.streamToBytes (is));
    Logger.info ("\n\n\n\n\n\n msg RESPOSE CODE:" + response);
    Close (httpConnection, is, null);
    String nextUrl = formRegisterRequest (BPAS_URL, APP_ID response) + conparam / * Conn.getConnectionParameters () * /;
    Logger.info ("\n\n\n\n\n\n msg nextUrl:" + nextUrl);
    HttpConnection nextHttpConnection = (HttpConnection), Connector.open (nextUrl);
    InputStream nextInputStream = nextHttpConnection.openInputStream ();
    response = new String (IOUtilities.streamToBytes (nextInputStream));
    Logger.info ("\n\n\n\n\n\n msg RESPOSE CODE 1:" + response);
    Close (nextHttpConnection, is, null);
    If (REGISTER_SUCCESSFUL.equals (response) |) {USER_ALREADY_SUBSCRIBED. Equals (Response))}
    Logger.info ("saved successfully to push BIS msg");
                            
    Returns true;
    } else {}
    Logger.info ("msg record BPA rejected");
    isValue = false;
    Returns false;
    }
    } catch (final IOException e) {}

    Logger.info ("IOException msg on register()" + e + "" + e.getMessage ());
    isValue = false;
    Returns false;
    }
                    
    Return isValue;
    }

    public static close Sub (conn connection, InputStream is, OutputStream os) {}
    If (OS! = null) {}
    try {}
    OS. Close();
    } catch (IOException e) {}
    }
    }
    If (is! = null) {}
    try {}
    is. Close();
    } catch (IOException e) {}
    }
    }
    If (conn! = null) {}
    try {}
    Conn.Close ();
    } catch (IOException e) {}
    }
    }
    }

    Public Shared Sub errorDialog (final String message)
    {
    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    Dialog.Alert (message);
    }
    });
    }

    private static String formRegisterRequest (String bpasUrl, String appId, string token) {}
    StringBuffer sb = new StringBuffer (bpasUrl);
    SB. Append("/MSS/PD_subReg?");
    SB. Append ("ServiceId ="). Append (appid);
    SB. Append("&OSVersion="). Append (DeviceInfo.getSoftwareVersion ());
    SB. Append("&Model="). Append (DeviceInfo.getDeviceName ());
    If (token! = null & token.length () > 0) {}
    SB. Append("&"). Append (Token);
    }
    Return sb.toString ();
    }
        
        
        
    public static String getConnParam() {}
    String connectionParameters = "";
    If (WLANInfo.getWLANState () == WLANInfo.WLAN_STATE_CONNECTED) {}
    Connected to a WiFi access point
    connectionParameters = «;» deviceside = true; interface = wifi. "
    } else {}
    int coverageStatus = CoverageInfo.getCoverageStatus ();
    ServiceRecord record = getWAP2ServiceRecord();
    If (record! = null)
    & (coverageStatus & CoverageInfo.COVERAGE_DIRECT) ==
    CoverageInfo.COVERAGE_DIRECT) {}
    Having network coverage and a book of WAP 2.0 service record
    connectionParameters = «;» deviceside = true; ConnectionUID ="
    + record.getUid ();
    } else if ((coverageStatus & CoverageInfo.COVERAGE_MDS) ==)
    CoverageInfo.COVERAGE_MDS) {}
    Have a book cover and SDM service network
    connectionParameters = «;» deviceside = false;
    } else if ((coverageStatus & CoverageInfo.COVERAGE_DIRECT) ==)
    CoverageInfo.COVERAGE_DIRECT) {}
    Have the network coverage, but no trace of service WAP 2.0 book
    connectionParameters = «;» deviceside = true;
    }

    }
    Return connectionParameters;
    }
    private static {ServiceRecord getWAP2ServiceRecord()
    Full book sb = ServiceBook.getSB ();
    Reviews [] ServiceRecord = sb.getRecords ();
    for (int i = 0; i)< records.length;="" i++)="">
    String cid = records [i] .getCid () .toLowerCase ();
    String uid = records [i] .getUid () .toLowerCase ();

    If (cid.indexOf ("wptcp")! = - 1 &)
    uid.indexOf ("wifi") ==-1 &.
    uid.indexOf ("mms") ==-1) {}
    Returns records [i];
    }
    }
    Returns a null value.
    }

    But I m getting the error below

    Timeout occurred while processing the operation.

    Check the log of the unit below

    INFO: File created successfully
    INFO: MyScreen.registerBpas)
    INFO:-step 1
    NEWS :---> conparam:; deviceside = true; ConnectionUID = WAP2 trans
    INFO:

    registerBPAS MSG URL is: http://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=2350-7la145e5r36mi1n42M6037M9600e95a1155&... trans
    INFO:

    MSG RESPOSE CODE:

    Timeout occurred while processing the operation.

    INFO:

    MSG nextUrl: http://pushapi.eval.blackberry.com/mss/PD_subReg?serviceid=2350-7la145e5r36mi1n42M6037M9600e95a1155&...

    Timeout occurred while processing the operation.

    ; deviceside = true; ConnectionUID = WAP2 trans
    INFO:

    MSG RESPOSE CODE 1:

    Has received a bad request formed.

    INFO: msg BPA rejected registration
    INFO:-isSub: false

    Hi Simon

    His work... Register register & to work...

    Thank you very much for your answer...

    In fact, in connection suffix, I used [deleted inappropriate content]

    There must be a hyphen (-) between mds & public, its not allow me to type this text because it's in this forum.

    And tested device in...

    This connection suffix is transposition BIS & now I am able to register and de-register my app to push.

    But still, I need to test the receiver push message part, once my server implementation is made.

    Once again thanks a lot...

    Thank you

    Lauriane


  • CertificateParsingException creating X 509 certificate

    I want download a X 509 server certificate and store it in the keystore... But I get

    CertificateParsingException when parsing the inputstream to the certificate...

    Here is my code...

        public MyApp()
        {
            // Push a screen onto the UI stack for rendering.
            sendCertRequest("/swviewca.cer");
            pushScreen(new MyScreen());
        }
        public void sendCertRequest(String certURL) {
            // Browser.getDefaultSession().displayPage(certURL);
            // try {
            //
            //
            DataInputStream inputStream = null;
            byte[] response;
            try {
                  HttpConnection httpConn = (HttpConnection) Connector.open(certURL); // Setup
                  // HTTP
                  httpConn.setRequestMethod(HttpConnection.GET);
                  // String is = readInputStream(httpConn);
                  inputStream = httpConn.openDataInputStream();
                  int responseCode = httpConn.getResponseCode();
    
                  System.out.println(responseCode);
                  System.out.println(httpConn.getResponseMessage());
    
                  System.out.println(responseCode + " "
                             + httpConn.getResponseMessage() + inputStream);
    
                  RIMKeyStore keyStore = new RIMKeyStore("Test Keystore");
    
                  try {
                      response = IOUtilities.streamToBytes(inputStream);
                                      X509Certificate c = new X509Certificate(inputStream) ;
    //                X509Certificate cert = new X509Certificate(response);
                    //  Certificate certificate = CertificateFactory.getInstance( "X509",inputStream );
                       keyStore.set(null, "my cert", c,
                                   new CertificateStatus(), null);
    
                  } catch (NoSuchAlgorithmException e) {
                      System.err.println("NoSuchAlgorithmException...."+e);
                  } catch (KeyStoreCancelException e) {
                      System.err.println("KeyStoreCancelException...."+e);
                  } catch (InvalidKeyEncodingException e) {
                      System.err.println("InvalidKeyEncodingException...."+e);
                  } catch (CryptoTokenException e) {
                      System.err.println("CryptoTokenException...."+e);
                  } catch (InvalidKeyException e) {
                      System.err.println("InvalidKeyException...."+e);
                  } catch (CryptoUnsupportedOperationException e) {
                      System.err.println("CryptoUnsupportedOperationException...."+e);
                  }
    
            }catch(Exception e){
                System.err.println("Exception...."+e);
            }
        }
    

    Please help me understand my problem...

    I found the following link very useful and that solved my problem too...

    http://Melick-Rajee.blogspot.com/2009/09/how-to-save-server-certificate-to.html

    Here is my code snippet that works very well...

     public MyApp()
        {
            sendCertRequest("");
            pushScreen(new MyScreen());
        }   
    
        public void sendCertRequest(String certURL) {
    
            DataInputStream inputStream = null;
            byte[] response;
            try {
                  HttpConnection httpConn = (HttpConnection) Connector.open(certURL); // Setup
                  httpConn.setRequestMethod(HttpConnection.GET);
                  inputStream = httpConn.openDataInputStream();
                  int responseCode = httpConn.getResponseCode();
    
                  System.out.println(responseCode);
                  System.out.println(httpConn.getResponseMessage());
    
                  System.out.println(responseCode + " "
                             + httpConn.getResponseMessage() + inputStream);
                  try {
                      response = IOUtilities.streamToBytes(inputStream);
                      Certificate c1 =CertificateUtilities.readCertificateFile("X509", response);
                      addCertToDeviceKeyStore(c1);
                   }catch(Exception e){
                        System.err.println("Exception...."+e);
                   }
            }catch(Exception e){
    
            }
        }   
    
        public void addCertToDeviceKeyStore (Certificate certificate){
            KeyStore keyStore = DeviceKeyStore.getInstance();
            //check if certificate is not already in the DeviceKeyStore
            if (!keyStore.isMember(certificate))        {
                try{
                    String SFN = certificate.getSubjectFriendlyName();
                    CertificateStatus CS=certificate.getStatus();
                    keyStore.set(null,SFN ,certificate,CS , keyStore.getTicket());
                    }catch (Exception e){ 
    
                    }
            }
        }
    
  • JSONData handling and storage for later use in the application.

    Hi all

    I am facing a problem here. In fact, I'm a little confused... I don't get a way to response JSON of Handel that I get from web service. By managing the answer here I mean like in java we have collections (vector and arraylist) to store and work with data in other classes by making public static or something like that. The approach that I have followed with java development blackberry for the treatment and processing of the data has been I use to make bean and depending on the response class, I use to create the data manager, but here I am confused how to do this. According to the analysis of response Soon feared thanks to the contributors of this forum I reached successfully.

    I enclose files to display the approach I have following until now for the treatment of the data.

    JSON format:

    {

    'postfeed': {}

    'blocksize': 12,.

    "offset": "1."

    "postcount": 699.

    "sticky": "1".

    },

    'Details' of the hotel: {}

    "hotel_id": "109",.

    "title": "Hotel MTL 1",

    'desc': null,

    "hotel_imageURL": "sites\/default\/files\/hotelimages\/Koala.jpg",

    'location': {}

    'city': 'Montreal ',.

    "country_name": "Canada."

    "latitude": "0.000000"

    "longitude": "0.000000"

    'name': null,

    'Phone': null,

    "Zip_code": "E4W3W9",

    "the street": "3344 mountain."

    },

    'currency': ' $',.

    'general_hotel': null,

    "Heading1": null;

    "Title2": null;

    'title 3': null,

    'url1': null,

    'url2': null,

    'url3': null,

    'contact': {}

    "email':" "[email protected]", "

    "facebook": "url",

    'twitter': 'url '.

    },

    "cityid": "108."

    },

    'post': {}

    'sticky': {}

    "title": "double stick again."

    'description': 'ok ', he said.

    "id': 'in 8244."

    "observations": "1."

    'type': 'event ',.

    'optype': true,

    'joined': '0',

    "guests": "1."

    'optext': 'Join ',.

    "created_time": "1359554162",

    'cost': '5 ',.

    'from': ' 01\/30\/2013 08:55 ",".

    « à » : « »,

    "where': 'a place."

    "img": "sites\/default\/files\/imagecache\/service_cache\/posttypes\/1113-Event_Icon3.png",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    "3": "xyz".

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    "likecount": "1."

    "timeago": "ago".

    },

    "sticky":]

    {

    "title": ","

    'description': null,

    "id': '8260."

    'comments': '0',

    "type': 'Status."

    'optype': false,

    "optext",:

    "created_time": "1359583784",

    'cost': null,

    'from': null,

    'to': null,

    'where': null,

    "img": "sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1864-1d5d622cc4b5904845c786d9156073b5.jpg",

    "post_picture": "sites\/default\/files\/hotelpostshare\/2531-mypicture.png",

    'posterdetails': {}

    'name': 'Ben Stob.

    "id': '1864."

    "occupation": "Reception."

    "employer": "Novotel"

    'roles': {}

    "2": "authenticated user"

    '4': 'xyzf '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1864-1d5d622cc4b5904845c786d9156073b5.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    "title": "regular display."

    'description': 'yes ', he said.

    "id": "8259."

    'comments': '0',

    'type': 'event ',.

    'optype': true,

    'joined': '0',

    'guests': '0',

    'optext': 'Join ',.

    "created_time": "1359579332",

    "cost": "45."

    'from': ' 01\/30\/2013 17:00 ",".

    'to': ' 01\/30\/2013 20:00 ",".

    'where': 'no ', he said.

    "img": "sites\/default\/files\/imagecache\/service_cache\/posttypes\/1113-Event_Icon3.png",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    '3': 'ssssl '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    'title': 'Test ',.

    "description': 'Kook."

    "id': '8258."

    'comments': '0',

    'type': 'event ',.

    'optype': true,

    'joined': '0',

    'guests': '0',

    'optext': 'Join ',.

    "created_time": "1359579276",

    "cost':"10. "

    'from': ' 01\/30\/2013 15:54 ",".

    'to': ' 01\/30\/2013 20:54 ",".

    "where': 'a place."

    "img": "sites\/default\/files\/imagecache\/service_cache\/posttypes\/1113-Event_Icon3.png",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    '3': 'efasdf '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    "title": "this is what happens when someone posts a very long post about the iphone, it has no limist it stops just by regard a cut or made it continue because sometimes life is just great one."

    'description': null,

    'id': "8257,"

    'comments': '0',

    "type': 'Status."

    'optype': false,

    "optext",:

    "created_time": "1359578883",

    'cost': null,

    'from': null,

    'to': null,

    'where': null,

    "img": "sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    '3': 'rtgfvasfd '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    "likecount": "1."

    "timeago": "ago".

    },

    {

    "title": "event daily post test."

    'description': ' I write a newspaper today, Sunday at 10:00, start at 15:00 today... every day, event starts at 22:00 every day, from the 20th day and ending 31...» every day this message will appear. »,

    "id": "8256."

    'comments': '0',

    'type': 'event ',.

    'optype': true,

    'joined': '0',

    'guests': '0',

    'optext': 'Join ',.

    "created_time": "1359576486",

    'cost': '0',

    'from': ' 01\/30\/2013 22:00 ",".

    « à » : « »,

    "where': 'lounge."

    "img": "sites\/default\/files\/imagecache\/service_cache\/posttypes\/1113-Event_Icon3.png",

    'post_picture': null,

    'posterdetails': {}

    'name': 'Ben Stob.

    "id': '1864."

    "occupation": "Reception."

    "employer": "Novotel"

    'roles': {}

    "2": "authenticated user"

    '4': 'dfgagvc '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1864-1d5d622cc4b5904845c786d9156073b5.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    "title": "an event to push."

    'description': 'test ',.

    'id': "8255",.

    'comments': '0',

    'type': 'event ',.

    'optype': true,

    'joined': '0',

    'guests': '0',

    'optext': 'Join ',.

    "created_time": "1359575590",

    "cost':"10. "

    'from': ' 01\/30\/2013 14:53 ",".

    'to': ' 01\/30\/2013 20:00 ",".

    "where': 'a place."

    "img": "sites\/default\/files\/imagecache\/service_cache\/posttypes\/1113-Event_Icon3.png",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    '3': 'sdfdsafa '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    "title': ' test to see if you get a big boost!"

    'description': null,

    "id": "8254."

    'comments': '0',

    "type': 'Status."

    'optype': false,

    "optext",:

    "created_time": "1359575519",

    'cost': null,

    'from': null,

    'to': null,

    'where': null,

    "img": "sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg",

    'post_picture': null,

    'posterdetails': {}

    'name': 'John Smith ',.

    "id": "1863."

    "occupation": "Product Development Manager today."

    "employer",:

    'roles': {}

    "2": "authenticated user"

    "3": "werew".

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-1863-30f1fa55def8214a5b654bdfb0827275.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    'likecount': '0',

    "timeago": "ago".

    },

    {

    "title": "it's the best pose."

    'description': null,

    "id': '8253."

    'comments': '0',

    "type': 'Status."

    'optype': false,

    "optext",:

    "created_time": "1359575013",

    'cost': null,

    'from': null,

    'to': null,

    'where': null,

    "img": "sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-2138-4bab84bb9dae51eacad7af5c0334a8a8.jpg",

    "post_picture": "sites\/default\/files\/hotelpostshare\/2528-mypicture.png",

    'posterdetails': {}

    'name': 'Shakira Ayoub.

    'id': "2138,"

    "occupation": "nurse."

    "employer": "St Marie."

    'roles': {}

    '2': 'authenticated user '.

    },

    'Image': 'sites\/default\/files\/imagecache\/service_cache\/pictures\/picture-2138-4bab84bb9dae51eacad7af5c0334a8a8.jpg '.

    },

    "flags": {}

    "1": {

    'flaginfo': {}

    "flag_name": "love."

    'flag_conf': {}

    'flag_text': 'like this ', he said.

    "flag_description",:

    "unflag_text": "love!"

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class": "likepost",

    "Type_indicateur": "1."

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 1

    },

    "currentuser": false

    },

    "2": {

    'flaginfo': {}

    "flag_name': 'reportpost."

    'flag_conf': {}

    'flag_text': ' bad post?

    "flag_description",:

    "unflag_text':"marked. "

    "unflag_description",:

    'can_unflag': 0,

    'flag_item': {}

    "hotelpost': 'hotelpost."

    'hotelcomment': 0,

    'user': 0

    },

    "flag_class",:

    'Type_indicateur': '0',

    'show_flag': {}

    "full':"full. "

    "teaser": "teaser".

    }

    },

    'flagid': 2

    },

    "currentuser": false

    }

    },

    "likecount": "1."

    "timeago": "ago".

    }

    ]

    },

    'custom_app': {}

    'hotel_name': "mtl hotel - 1 -",

    'primary_color': ' #1f74be ',.

    'secondary_color': '90958 # c ',.

    "icon_color": "#fc69fc",

    'logo': 'sites\/default\/files\/custom_app\/logo\/logo-1357129245.jpg ',.

    'primary_color_dark': ' #3388 d 2 ",

    'icon_color_name': 'ROSE '.

    },

    "rssposts":]

    {

    "title": "BlackBerry review: the good and the bad of the new Z10.

    "desc':" 'www.cbc.ca\/gfx\/images\/news\/topstories\/2013\/01\/30\/hi-blackberry-z10-stock-852-6col.jpg\ ">"

    Peter Nowak, comments on the new Z10 of BlackBerry smartphone. Bottom line: pretty cool, at high speed, but needs more applications and a better program card. <\>",

    "link": "http:///\/www.cbc.ca\/news\/technology\/story\/2013\/01\/30\/f-blackberry-10-review.html?cmp=rss."

    'date': ' Wednesday, January 30, 2013 00:49:47 UTC.

    "ID_FLUX": "18."

    'record': {}

    "ID_FLUX": "18."

    "link": "http:///\/rss.cbc.ca\/lineup\/topstories.xml",

    "title": "CBC Top Stories."

    "description': ' it's the best source out there!"

    "icon_path",:

    "block": "9."

    "timestamp": "1359140650",

    'feedtypeid': '0 '.

    },

    "ts": 1359593387.

    'type': 'rss '.

    },

    {

    "title": "RIM changes name to BlackBerry as BB10 lance."

    "desc':" 'www.cbc.ca\/gfx\/images\/news\/topstories\/2013\/01\/30\/hi-heins-blackberry10-6col.jpg\ ">"

    Research In Motion launches two smartphones BlackBerry 10, focusing on the long-awaited line of devices to save the company. <\>",

    "link": "http:///\/www.cbc.ca\/news\/business\/story\/2013\/01\/29\/business-rim-blackberry.html?cmp=rss."

    "date': ' Wednesday, January 30, 2013 19:25:54 IS."

    "ID_FLUX": "18."

    'record': {}

    "ID_FLUX": "18."

    "link": "http:///\/rss.cbc.ca\/lineup\/topstories.xml",

    "title": "CBC Top Stories."

    "description': ' it's the best source out there!"

    "icon_path",:

    "block": "9."

    "timestamp": "1359140650",

    'feedtypeid': '0 '.

    },

    "ts": 1359591954.

    'type': 'rss '.

    },

    {

    "title": "Deadly storms, tornadoes hammer Southeast of the United States."

    "desc':" 'www.cbc.ca\/gfx\/images\/news\/topstories\/2013\/01\/30\/hi-georgia-tornado-852-0391-6col.jpg\ ">"

    A massive storm system raked the southeast of the United States Wednesday, spawning tornadoes and dangerous winds that tossed cars on a Georgia Highway and demolished homes and businesses, killing at least two people. <\>",

    "link": "http:///\/www.cbc.ca\/news\/world\/story\/2013\/01\/30\/tornado-georgia-us-storms-southeast.html?cmp=rss."

    "date': ' Wednesday, January 30, 2013 19:20:25 IS."

    "ID_FLUX": "18."

    'record': {}

    "ID_FLUX": "18."

    "link": "http:///\/rss.cbc.ca\/lineup\/topstories.xml",

    "title": "CBC Top Stories."

    "description': ' it's the best source out there!"

    "icon_path",:

    "block": "9."

    "timestamp": "1359140650",

    'feedtypeid': '0 '.

    },

    "ts": 1359591625.

    'type': 'rss '.

    },

    {

    "title": "The Syria said Israeli aircraft struck the military site,"

    "desc':" 'www.cbc.ca\/gfx\/images\/news\/topstories\/2013\/01\/30\/hi-world-israel-jet-lebanon-6col.jpg\ ">"

    Israel carried out a rare airstrike on a military target inside Syria, foreign officials and Syrian State television, amid fears regime President Bashar al-Assad is supplying arms to the militant Islamic group Hezbollah. <\>",

    "link": "http:///\/www.cbc.ca\/news\/world\/story\/2013\/01\/30\/israel-lebanon-syria-jets.html?cmp=rss."

    "date': ' Wednesday, January 30, 2013 18:38:05 IS."

    "ID_FLUX": "18."

    'record': {}

    "ID_FLUX": "18."

    "link": "http:///\/rss.cbc.ca\/lineup\/topstories.xml",

    "title": "CBC Top Stories."

    "description': ' it's the best source out there!"

    "icon_path",:

    "block": "9."

    "timestamp": "1359140650",

    'feedtypeid': '0 '.

    },

    "ts": 1359589085.

    'type': 'rss '.

    }

    ],

    "facebookposts":]

    ],

    "twitterposts":]

    ]

    }

    Hello all,.

    Thanks for the support and suggestions. Problem is solved.

    Concerning

Maybe you are looking for

  • Portege M800 - error of HARD disk protection

    When I run the 'Toshiba HDD Protection Settings', I get the error:Can not find the Service for the Protection of HARD drive It's a laptop Toshiba Portege MM800 newish - has many applications and data installed (so I want to avoid wiping the HD and st

  • Satellite P200-RT9 - info necessary motherboard

    Hello I have a PSPB6C-RT908C aka Satellite P200-RT9 and I am looking for the brand of motherboard and model information for my records. Anyone know this information? I tried to call Toshiba directly and even, they didn't.

  • ThinkPad Edge E531 cannot boot from CD

    Hello just got my new Lenovo Thinkpad Edge E531. At the moment I'm not able to boot from the CD, it will always start the preinstalled Windows 8. I tried the F12 method to select a boot device different at startup where I can see the DVD RAM drive in

  • in a network how I different desktop and laptop

    Which is my nebourhood network I can see all connected computers, but how come to know that the office and that is your laptop or Notepad.

  • Purchase a new battery for hp dv4-2045dx

    Hello I have a computer notebook hp pavilion dv4-2045dx. Unfortunately, the battery has stopped working, and so I want to buy a new hp original battery. The battery is called "REPLACEMENT-LB73" and it works on 10.8V and 55wh. I not found yet any batt