Creating a posted appointment with PHP

Even though the web services documentation shows an example for
sendItemRequest to send an appointment, I can't seem to make something
like that work with the PHP client.

I'm trying to create a proper object of the Appointment class, but all
that I've got to show for it so far is that I get a posted message (and
not an appointment) in my regular Mailbox folder which doesn't even have
the subject I entered in it, not to mention any of the other attributes I
specified.

Can anyone enlighten me as to the proper PHP syntax for setting up a
sendItemRequest object with an Appointment item to create a posted
appointment in someones calendar?

I want to use this to populate everyone's calendars with next year's
national holidays.

--
Greetings/Groetjes,
Maurice Snellen

Tags:

  • It would be awhile before I could look at the problem.
    You will probably have to debug the problem.
    Also get a SOAP trace. That will help you see what is
    going wrong.

    Preston

    >>> On Wednesday, November 12, 2008 at 8:37 AM, Maurice

    Snellen<msnellen@anwb.nl>
    wrote:
    > Even though the web services documentation shows an example for
    > sendItemRequest to send an appointment, I can't seem to make something
    > like that work with the PHP client.
    >
    > I'm trying to create a proper object of the Appointment class, but all
    > that I've got to show for it so far is that I get a posted message (and
    > not an appointment) in my regular Mailbox folder which doesn't even have
    > the subject I entered in it, not to mention any of the other attributes I
    > specified.
    >
    > Can anyone enlighten me as to the proper PHP syntax for setting up a
    > sendItemRequest object with an Appointment item to create a posted
    > appointment in someones calendar?
    >
    > I want to use this to populate everyone's calendars with next year's
    > national holidays.

  • Op Thu, 13 Nov 2008 12:36:23 GMT schreef Preston Stephenson:

    > It would be awhile before I could look at the problem.
    > You will probably have to debug the problem.
    > Also get a SOAP trace. That will help you see what is
    > going wrong.


    That's one of the problems. The trace is completely empty if I try to do
    this in WSDL mode. I've mostly tried this within the PHP Tools for
    GroupWise (PTG) framework that Johan Reinalda created and announced on
    this forum. He provided me with a non-WSDL version of the sendItemRequest
    function in the GroupWiseService class, but that bombs as well, reporting
    a: SOAP-ERROR: Encoding: object hasn't 'container' property.

    What I'm trying to do is this:

    $myApp = new Appointment();
    $myApp->source = 'personal';
    $myApp->class = 'Private';
    $myApp->security = 'Normal';
    $myApp->subject = 'Nieuwjaarsdag';
    $myApp->startDate = '20090101T000000Z';
    $myApp->endDate = '20090102T000000Z';
    $myApp->acceptLevel = 'OutOfOffice';
    $myApp->allDayEvent = true;

    $sir = new sendItemRequest();
    $sir->item = $myApp;

    $res = $gwclient->sendItemRequest_nonWSDL($sir);


    sendItemRequest_nonWSDL is defined as:

    public function sendItemRequest_nonWSDL(sendItemRequest $sendItemReq) {
    $sendItemReq->item = new SoapVar($sendItemReq->item, SOAP_ENC_OBJECT,
    get_class($sendItemReq->item));
    return $this->__call('sendItemRequest', array(
    new SoapParam($sendItemReq, 'sendItemReq')
    ),
    array(
    'uri' =>
    'schemas.novell.com/.../groupwise.wsdl',
    'soapaction' => ''
    )
    );
    }

    Commenting out the first line of this function doesn't matter.

    What puzzles me, is that according to the php logfile the SOAP-ERROR gets
    thrown in unacceptRequest which I don't call.



    --
    Greetings/Groetjes,
    Maurice Snellen