使用$ gwservice PHP在groupwise中创建约会

时间:2011-11-22 12:03:33

标签: php groupwise

我正在尝试通过NOVELL提供的SOAP库创建一个apointment。像这样:

  $appointment = new Appointment();
  $appointment->source = 'personal';
  $appointment->class = 'Private';
  $appointment->security = 'Normal';
  $appointment->subject = 'TEST';
  $appointment->startDate = '20110101T000000Z';
  $appointment->endDate = '20110102T000000Z';
  $appointment->allDayEvent = true;

  $sir = new sendItemRequest();
  $sir->item = $appointment;
  $res = $gwservice->sendItemRequest($sir);

$res变量上的var转储返回:

object(stdClass)#94 (1) {
    ["status"]=>
    object(stdClass)#93 (2) {
        ["code"]=>
        int(59920)
        ["description"]=>
        string(22) "Missing session string"
    }
}

我试图放入从loginrequest返回的会话字符串,但无法创建约会。

我显然很丢失。有人对此有任何不满吗?您是否通过Novell提供的gwservice获得了创建项目的成功片段?

1 个答案:

答案 0 :(得分:1)

您是否检查了登录结果中的错误,可能是您没有有效的会话。

<?php
$lres = $gwservice->loginRequest($lr);

// check for errors
if ( $lres->code != 0 ) 
{
    print "code: " . $lres->code . " - " . $lres->description . "\n";
}
else if ( $lres['status']->code == 0 ) 
{
    // save off the session string
    $gwservice->session = $lres['session'];
    print "name: " . $lres['userinfo']->name . "\n";
}