我正在尝试通过NOVELL提供的SOAP库创建一个约会。像这样:
$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
变量的变量转储返回:
object(stdClass)#94 (1) {
["status"]=>
object(stdClass)#93 (2) {
["code"]=>
int(59920)
["description"]=>
string(22) "Missing session string"
}
}
我尝试放置从loginrequest返回的会话字符串,但未能创建约会。
我显然迷路了。有人对此有什么见解吗?你有通过Novell提供的gwservice成功创建项目的代码片段吗?
您是否检查了登录结果是否有错误,可能您没有一个有效的会话
<?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";
}