Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Desktop > General Questions

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-10-2008, 08:31 AM
Junior Member
 
Posts: 5
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?
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 02:34 AM
New Member
 
Posts: 4
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.
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 10:00 AM
Junior Member
 
Posts: 5
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?
Reply With Quote
  #4 (permalink)  
Old 04-16-2008, 06:31 AM
New Member
 
Posts: 4
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
Reply With Quote
  #5 (permalink)  
Old 04-16-2008, 07:21 AM
Junior Member
 
Posts: 5
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>
Reply With Quote
  #6 (permalink)  
Old 04-16-2008, 08:20 AM
New Member
 
Posts: 4
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.
__________________
Zimbra OSS 5.0.1 GA - Ubuntu 7.10 / Debian 4.0
Zimbra Desktop b1083 - Ubuntu 7.10

Last edited by fmaguin; 04-16-2008 at 08:35 AM..
Reply With Quote
  #7 (permalink)  
Old 04-16-2008, 08:34 AM
Junior Member
 
Posts: 5
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.
Reply With Quote
  #8 (permalink)  
Old 04-16-2008, 09:25 AM
Junior Member
 
Posts: 5
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.