TestMe

From Pickwiki
Jump to navigationJump to search
<?php
   echo "this is a test";

   $ub = new Java("[[UniBean]]");

   $ex=java_last_exception_get();
   if ($ex) {
      print "ERROR excountered: <br><br>";
      print $ex->toString();
   }
   else {
      // Initilize the bean
      $ub->init();

      // Logon to the database (please don't do it this way, big security 
      // hole here.
      $ub->logon("usename","password","foo.foo.com","/path/to/account");

      // Display the results from "LIST VOC SAMPLE 10"
      echo "<pre>";
      echo  $ub->getTest();
      echo "<nowiki>

</nowiki>

";

     // Display the User name and account
     echo $ub->getAccountPath();
     // Logout
     $ub->logout();
  }

?>