Results 1 to 7 of 7

Thread: Can't modify appointment via SOAP

  1. #1
    Join Date
    Mar 2006
    Posts
    52
    Rep Power
    9

    Default Can't modify appointment via SOAP

    We have cars as resources and users who see their calendars. The organizer of the appointment is set to user.

    This worked fine until we upgraded to Zimbra 4.5. Now the attempt to modify appointment via SOAP gives error:
    Cannot create/modify an appointment/task with organizer set to robert@abak.net when using account toyota@abak.net.

    Changing account to robert@abak.net gives this error:
    no such appointment or task

    Changing organizer to toyota@abak.net gives this:
    Changing organizer of an appointment/task is not allowed: old=robert@abak.net, new=toyota@abak.net

    How can we modify these appointments?
    Last edited by Abak; 01-29-2007 at 11:21 PM. Reason: organizer is not se to car but user (mistake)

  2. #2
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default Via web UI?

    Does it work to login as robert via the web UI and modify the appointment in that way?

    Alternatively, auth as robert and do your command via SOAP, qualifying the appointment ID that you're acting on (i.e. instead of id="777", use id="{toyota-zimbra-id}:777").

    Or auth as robert and go via SOAP, adding an <account by="name">toyota@abak.net</account> element to the <context> block in the SOAP header.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    Join Date
    Sep 2005
    Posts
    57
    Rep Power
    10

    Default

    Can you post more detail on the existing appointment and what you're trying to do with it?

    Run the web UI with "?mode=mjsf&gzip=false&debug=1" argument in the URL to bring up the debug window, then go to the calendar and open the appointment, and cut/paste the GetMsgRequest and GetMsgResponse dumped in the debug window.

    Edit and save the appointment, and cut/paste the ModifyAppointmentRequest and the error response, for both of your error cases.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  4. #4
    Join Date
    Mar 2006
    Posts
    52
    Rep Power
    9

    Default

    dkarp, no matter if we login as robert or toyota, the appointment is always read only in web UI. Both solutions you suggest give "no such appointment or task" error.

    jhahm, here is data you requested:

    HTML Code:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
    <context xmlns="urn:zimbra">
    <userAgent name="ZimbraWebClient - FF2.0 (Win)" version="4.5.0_GA_612.SuSEES9"/>
    <sessionId id="370"/>
    <notify seq="4"/>
    <change token="5715" type="new"/>
    <authToken>
    0_26ad55a09e93688a4ff61aa630bc931e1a5588b3_69643d33363a33383630643766342d313566662d346334362d383530362d3331376334373639663630303b6578703d31333a313137303331333031353537313b
    </authToken>
    <format type="js"/>
    </context>
    </soap:Header>
    <soap:Body>
    <GetMsgRequest xmlns="urn:zimbraMail">
    <m id="09610263-89f7-4927-855e-97a9a0c0e5c3:258-257" read="1" html="1"/>
    </GetMsgRequest>
    </soap:Body>
    </soap:Envelope>
    HTML Code:
    Body: {
      GetMsgResponse: {
        _jsns: "urn:zimbraMail",
        m: [
          0: {
            d: 1145709514000,
            id: "09610263-89f7-4927-855e-97a9a0c0e5c3:258-257",
            inv: [
              0: {
                comp: [
                  0: {
                    apptId: "09610263-89f7-4927-855e-97a9a0c0e5c3:258",
                    at: [
                      0: {
                        d: "Robert",
                        ptst: "NE",
                        role: "REQ",
                        rsvp: true,
                        url: "robert@abak.net"
                       },
                      1: {
                        cutype: "RES",
                        d: "Toyota",
                        ptst: "AC",
                        role: "NON",
                        rsvp: true,
                        url: "toyota@abak.net"
                       }
                     ],
                    calItemId: "09610263-89f7-4927-855e-97a9a0c0e5c3:258",
                    compNum: 0,
                    e: [
                      0: {
                        d: "20061123T100000",
                        tz: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna"
                       }
                     ],
                    fb: "B",
                    fba: "B",
                    loc: "",
                    name: "Appointment 2006000040 23.11.2006",
                    or: {
                      d: "Robert",
                      url: "robert@abak.net"
                     },
                    replies: [
                      0: {}
                     ],
                    rsvp: true,
                    s: [
                      0: {
                        d: "20061123T090000",
                        tz: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna"
                       }
                     ],
                    seq: 0,
                    status: "CONF",
                    transp: "O",
                    x_uid: "5ffd0061-7afd-47a8-93b0-6da514584615"
                   }
                 ],
                tz: [
                  0: {
                    daylight: [
                      0: {
                        hour: 2,
                        min: 0,
                        mon: 3,
                        sec: 0,
                        week: -1,
                        wkday: 1
                       }
                     ],
                    dayoff: 120,
                    id: "(GMT+01.00) Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna",
                    standard: [
                      0: {
                        hour: 3,
                        min: 0,
                        mon: 10,
                        sec: 0,
                        week: -1,
                        wkday: 1
                       }
                     ],
                    stdoff: 60
                   }
                 ]
               }
             ],
            l: "09610263-89f7-4927-855e-97a9a0c0e5c3:10",
            mid: "<27943048.17441145709514832.JavaMail.root@linux>",
            mp: [
              0: {
                ct: "multipart/alternative",
                mp: [
                  0: {
                    body: true,
                    content: "",
                    ct: "text/plain",
                    part: "1"
                   },
                  1: {
                    ct: "text/calendar",
                    filename: "meeting.ics",
                    part: "2",
                    s: 1657
                   }
                 ],
                part: "TEXT",
                s: 1969
               }
             ],
            rev: 13,
            s: 2437
           }
         ]
       }
     },
    Header: {
      context: {
        _jsns: "urn:zimbra",
        change: {
          token: 5715
         },
        sessionId: [
          0: {
            _content: "370",
            id: "370"
           }
         ]
       }
     },
    _jsns: "urn:zimbraSoap"
    Last edited by Abak; 01-29-2007 at 11:38 PM. Reason: typo

  5. #5
    Join Date
    Mar 2006
    Posts
    52
    Rep Power
    9

    Default How about re-creating appointments

    We could write a script that would delete and re-create these appointments and this time set organizer to car instead of user.
    However this would send mails to users which would confuse them and is therefore inacceptable.
    Any way to temporarily disable sending mails for actions related to appointments?

  6. #6
    Join Date
    Sep 2005
    Posts
    57
    Rep Power
    10

    Default

    Deleting and recreating should work. To avoid re-notifying users, just omit the <e> element for recipients under <m>. The <e> element is used to specify email recipients and usually the same users are listed in <e>'s as <at>'s (attendees), but they don't need to be the same. (see below for on-behalf-of discussion)

    That should fix the problem for you, but can you tell me more about the problem so I can reproduce it and try to find a fix in a later release? The GetMsg trace seems to indicate this is what you did:

    - Robert creates an appointment and invites toyota. Both robert and toyota mailboxes have a copy of the appointment.
    - Robert opens toyota's calendar with manager rights.
    - Robert tries to edit toyota's appointment.

    Is this what's going on? That wouldn't work. Toyota is not the organizer, so its copy cannot be updated via ModifyAppointment. Robert would have to modify his own copy and send out an update email to toyota account.

    In 4.5, calendar sharing is done via on-behalf-of scheduling. User would login as robert and open toyota calendar as before, but when an appointment is created with toyota as target calendar, the organizer will be set to toyota and sent-by set to robert. If there are any attendees, the invite email goes out from robert mailbox and the recipients will see that the appointment was organized by robert on behalf of toyota. (From header says toyota, Sender header says robert.)
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    Join Date
    Mar 2006
    Posts
    52
    Rep Power
    9

    Default Solved

    We deleted all appointments and re-created them (100% SOAP). It works fine now.
    We noticed that some IDs of appointments, which are saved in our database, were different than those in Zimbra. It looks like upgrade to 4.5 changed around 50% of IDs, mostly the older appointments.

    Our solution until 4.5 was like this:

    1. Car grants read access to users.
    2. Car creates an appointment with organizer set to user (the driver of the car).

    We just changed part 2 to:
    2. Car creates an appointment with organizer set to car. The driver is atendee.

Similar Threads

  1. XSD/WSDL Files for the SOAP Server?
    By photoadrian in forum Developers
    Replies: 5
    Last Post: 12-23-2012, 01:32 AM
  2. Delete an Appointment via SOAP ?
    By minhle3012 in forum Developers
    Replies: 9
    Last Post: 09-26-2012, 07:47 PM
  3. PHP SOAP create appointment example
    By AddGun in forum Developers
    Replies: 13
    Last Post: 09-27-2010, 04:41 PM
  4. Jar For Soap Client
    By wcameron in forum Developers
    Replies: 19
    Last Post: 06-03-2009, 02:04 PM
  5. Bug with preauth mechanism and SOAP headers?
    By Coilcore in forum Developers
    Replies: 3
    Last Post: 07-20-2006, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •