使用 $gwservice PHP 分组创建约会

发布于 2024-12-17 13:21:42 字数 977 浏览 1 评论 0原文

我正在尝试通过 NOVELL。像这样:

  $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"
    }
}

我尝试放置从登录请求返回的会话字符串,但无法创建约会。

我显然迷路了。有人对此有任何内幕吗?您是否有通过 Novell 提供的 gwservice 创建的项目的成功片段?

I am trying to create an apointment trough the SOAP library provided by NOVELL. Like so:

  $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);

A var dump on the $res variable returns:

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

I tried to put the session string, that is returned from the loginrequest, but fail to create an appointment.

I am obviosuly lost. Anyone have any insite on this? Do you have any succesfull snippet of a created item trough the gwservice provided by Novell?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摘星┃星的人 2024-12-24 13:21:43

您检查登录结果是否有错误,也许您没有有效的会话。

<?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";
}

Did you check the login result for errors, maybe you don't have a valid session.

<?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";
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文