Results 1 to 8 of 8

Thread: Canceling appointments through SOAP

  1. #1
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default Canceling appointments through SOAP

    I have a page that shows the appointments booked to our conference rooms on our local intranet site. It pulls the appointments from the shared calendar of a generic user through a SOAP searchRequest.

    Now I need add functionality to cancel appointments through this page, and I can't get a cancelAppointmentRequest to work. I've looked at cancelAppointmentRequests in the dev window of the zimbra client and the id numbers for the appointments don't look like any of the numbers I'm getting through my searchRequest.

    The id in the cancel requests from the zimbra client are in the form of XXXX-XXXX and ids I'm getting through my searchresponse are much longer and in a totally different format.

    Can someone tell me where and how I can find the proper id number that a cancelappointmentrequest is looking for?

  2. #2
    Join Date
    Jan 2008
    Posts
    4
    Rep Power
    7

    Default

    Hi,

    I have checked what is used as ids with CreateAppointmentResponse, SearchResponse and CancelAppointmentRequest.

    CreateAppointmentResponse and SearchResponse will give you a invId to be used as id in CancelAppointmentRequest:
    {"Body":{"CreateAppointmentResponse":{"invId":" 501-500", ...SNIP...

    {"Body":{"SearchResponse":{"more":false,"sortBy":" dateAsc","appt":[{"uid":"..."
    ,"rev":900,"isOrg":true,"score":1.0,"inst":[{"s":...}],"id":"501","md":...,"name":"test"
    ,"fba":"B","invId":"501-500", ...SNIP...

    <CancelAppointmentRequest xmlns="urn:zimbraMail" id="501-500"
    comp="0"><m> ...SNIP...

    HTH.

  3. #3
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default

    Well, I thought that it was the invId that I was looking for. Unfortunately, my problem seems to be something else then.

    Can someone explain why I get back different id numbers than I need for a CancelAppointmentRequest query when I run a SearchRequest query?

    Here's an example appointment invId from a CreateAppointmentRequest sent from my zimbra client: 9610-9609 (These are the same ids used in the cancelAppointmentReqest)

    Here's the appointment invId for the same appointment, from my SearchResponse: 41f86f55-ab26-4eb8-aa9a-fa685909d763:810-809

    Why are the different, and what query do I need to run to get the invId in the correct format?

  4. #4
    Join Date
    Jan 2008
    Posts
    4
    Rep Power
    7

    Default

    The string you are showing (41f86f55-ab26-4eb8-aa9a-fa685909d763:810-809) seems to be composed of a uid (41f86f55-ab26-4eb8-aa9a-fa685909d763) and an invId (810-809).

    Could you post the body of the soap request/response ?
    Which version are you using ?

    Btw, you may have more answers to your problem in the developers forum.
    Zimbra OSS 5.0.1 GA - Ubuntu 7.10 / Debian 4.0
    Zimbra Desktop b1083 - Ubuntu 7.10

  5. #5
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default

    I've tried that, those last numbers (that look like an invId) aren't correct either.

    Here's the body of my search request:

    <soap:Body><SearchRequest xmlns="urn:zimbraMail" sortBy="none" limit="500" calExpandInstStart="1208351968000" calExpandInstEnd="1208438368000" types="appointment" offset="0"><query>inid:257 OR inid:258 OR inid:259 OR inid:260 OR inid:261</query></SearchRequest></soap:Body>

  6. #6
    Join Date
    Jan 2008
    Posts
    4
    Rep Power
    7

    Default

    Looks like your timestamps are wrong... SNIP... nope, it's ok as seems Zimbra takes it in ms

    I suppose you checked that the inid in the query elements are ok.
    Last edited by fmaguin; 04-16-2008 at 07:35 AM.
    Zimbra OSS 5.0.1 GA - Ubuntu 7.10 / Debian 4.0
    Zimbra Desktop b1083 - Ubuntu 7.10

  7. #7
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default

    Zimbra seems to like it's time in milliseconds rather than seconds, at least on our server. I don't know why that is, but that searchRequest returns the results I expect, apart from the wonky ID numbers.

  8. #8
    Join Date
    Feb 2008
    Posts
    5
    Rep Power
    7

    Default

    Thanks for your help, fmaguin.

    It turns out that my issues were related to using the proxy account. I tried running my script locally using my own account and everything worked perfectly. I guess I'm going to have to create a way for users to log in through that page in order for canceling appointments to work.

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. Jar For Soap Client
    By wcameron in forum Developers
    Replies: 19
    Last Post: 06-03-2009, 02:04 PM
  3. Replies: 1
    Last Post: 11-10-2008, 10:44 PM
  4. Cancel And Modify Appointments SOAP Question
    By noleman16 in forum Developers
    Replies: 2
    Last Post: 01-11-2008, 10:18 AM
  5. Replies: 11
    Last Post: 05-25-2006, 11:40 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
  •