BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   server application (http://www.blackberryforums.com/developer-forum/211650-server-application.html)

somashekar 11-24-2009 07:31 AM

server application
 
Hi All,

Am thinking of the application like the processing is done in the local server and the output displayed on the device.

can this application is possible to develop. please help me.


Thanks in advance...

Dougsg38p 11-24-2009 08:29 AM

You need to ask a better question.

somashekar 11-26-2009 03:58 AM

In what ways i can communicate with server.

Dougsg38p 11-26-2009 10:04 AM

HTTP. See the HTTPDemo application that ships with the JDE.

somashekar 11-27-2009 01:39 AM

thanks for the replay.

U have any idea about RMI(remote method invocation) in blackberry.

Thanks in advance

Dougsg38p 11-27-2009 09:16 AM

No - you'll need to use web services instead. Look at KSOAP (4.5 and lower) and/or JSR172.

peterjtracey 11-29-2009 08:02 AM

PHP Server
 
A simple way to get up and running is to use PHP as the server with QCubed ORM objects:

Code:

<?
require('../../../qcubed/wwwroot/includes/prepend.inc.php');
 
$server = new SoapServer(null, array('uri' => "urn:keyringlabs.com"));
$server->addFunction("login");
$server->handle();
 
function login($email, $pass) {
        if (strlen($email) == 0) {
                return Array('serviceToken' => '');
        } elseif (strlen($pass) == 0) {
                return Array('serviceToken' => '');
        } else {
                $objMerchant = Merchant::LoadByEmailPassword($email, $pass);
                if ($objMerchant == null || $objMerchant->Id < 1) {
                        return Array('serviceToken' => '');
                } else {
                        $key = uniqid();
                        $objSess = new Merchantsessions();
                        $objSess->MerchantID = $objMerchant->Id;
                        $objSess->ServiceToken = $key;
                        $objSess->Save();
                }
        }
 
        $result = Array('serviceToken' => $key);
        return $result;
}
 
 
?>

Note that for real applications the password should be encrypted which requires a bit more work...


All times are GMT -5. The time now is 12:38 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.