Quantcast
Channel: Micro Focus Forums
Viewing all articles
Browse latest Browse all 11924

I can't get items from the addressbooks

$
0
0
Hello,

i have a problem with the addressbooks. I wrote a php script with soap service for a list of all phone numbers, emails, birthdays etc.

Until a few days ago the script run correctly without problems. I changed nothing but now it doesn't work. I get the error "Missing session string". The login and the list of all addressbooks works but I can't get items from it.

Here is the part of the source:
PHP Code:

include "classes/GroupwiseService800.php";

$ABtoDUMP "Testgroup";  

$gwclient = new GroupwiseService(
                     array(
"location" => "http://IP-Adress/soap",    // Groupwiseserver
                              
"trace" => true,
                               
"connection_timeout" => 1000,
                           )
                      );
     
     
     
     
$tapp = new TrustedApplication();
$tapp->username "testuser";              // Groupwiseuser
$tapp->name "ABReader";                 // Trusted Applicationname
$tapp->key "TRUSTEDKEY";  // Trusted Application Key
     
     
//trusted login request
$lr = new loginRequest();
$lr->auth $tapp;
$lr->language "de";
$lr->userid true;                         
$lr->application "ABReader";           // Trusted Applicationname
$lr->version "1.03";
     
print 
"--> Login...<br>";
try {
      
$res $gwclient->loginRequestTrusted_nonWSDL($lr);
      
var_dump($res)."<br>";
  } 
    catch(
Exception $e) {
      print(
"ERROR Exception während der Loginabfrage");
    
$ERROR 1;        
    }
     
    if ( 
!= $res['status']->code ) {
        print 
"ERROR code: " $res->faultcode " - " $res->description "<br>";
        
$ERROR 1;
    }
    else {
        
#$gwclient->session = $res['session'];
        
print "<br>name: " $res['session'] . "<br>";
        print 
"OK gwVersion: " $res['gwVersion'] . "<br>";
    }
     
     
     
    
$options = array("location" => "http://IP-Address/soap",   // Groupwiseserver 
                    
"trace" => true,
                    
"gwtrace" => true,
                    
"connection_timeout" => 1000,
                    );
    
    
$gwclient = new GroupwiseService(
            
$options,
            
$res['session']
        );
     
     
    if ( 
$ERROR == )
    {
      print 
"--> Getting Addressbooklist...<br>";
     
      try {
          
$ablres $gwclient->getAddressBookListRequest();
      } catch(
Exception $e) {
          print(
'ERROR Exception while getAddressBookListRequest');        
          
$ERROR 1;
      }
       
// print "\n---\n"; var_dump($ablres); print "\n---\n";
        
$items count($ablres->books->book);
      print 
"  Books: " $items "<br>";
      if ( 
$items == )
      {
          
$ERROR 1;
      } else
      {
         foreach (
$ablres->books->book as $book)
             {

             
// print ("      " . $book->name ." ID:" . $book->id . "\n");
             
if ($book->name == $ABtoDUMP)
             {
                
#print ("  name: " . $book->name ."<br>ID:" . $book->id . "<br>");
                
$ABID $book->id;
             }   
         
             }
       }     
    }
     
    if (
$ABID == "")
    {
       print (
"ERROR: No Addressbooks >"$ABtoDUMP "<br>");
       
$ERROR 1;
    }
     
     
     
    if ( 
$ERROR == )
    {
        print 
"--> Getting Entrys...<br>";
        
$fe = new FilterEntry'eq''name'NULL'*'NULL );
        
$filt = new Filter$fe );
        
$ir = new getItemsRequest();
      
      
$ir->container $ABID;
        
$ir->filter $filt;
          
#print "\n---\n"; var_dump($ir); print "\n---\n";

        
$ires $gwclient->getItemsRequest($ir);
        print 
"\n---\n"var_dump($ires); print "\n---\n";
      
      
$items count($ires->items->item);
        print 
"     Entrys: " $items "<br><br>";
     } 

then I get this:
--- object(getItemsResponse)#35 (2) { ["items"]=> NULL ["status"]=> object(Status)#36 (4) { ["code"]=> int(59920) ["description"]=> string(22) "Missing session string" ["info"]=> NULL ["problems"]=> NULL } } ---
Notice: Trying to get property of non-object in C:\xampp\htdocs\groupwise_data.php on line 153


Please help me.

Best regards

P.S. I am using Groupwise 8.0.2

Viewing all articles
Browse latest Browse all 11924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>