Results 1 to 3 of 3

Thread: REST upload behaves abnormally...

  1. #1
    czaveri's Avatar
    czaveri is offline Former Zimbran
    Join Date
    Feb 2006
    Location
    Pune, India
    Posts
    294
    Rep Power
    9

    Default REST upload behaves abnormally...

    I tried uploading a local *.ics file using REST and the command:

    curl -u me@mydomain.com:myp455w0rd --data-binary @thelocal.ics http://mydomain.com/service/home/me@...lendar?fmt=ics

    This behaves abnormally, in the sense that, sometimes it will entirely replace the existing calendar - and - sometimes it will add to the existing calendar.

    Which behaviour is expected?

    Any idea why I get both of these behaviours?
    Regards,

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    Default Random or source-dependent?

    Do you get variable behavior on the same .ics file? Or do you get different behavior depending on which .ics file you POST?
    Bugzilla - Wiki - Downloads - Before posting... Search!

  3. #3
    czaveri's Avatar
    czaveri is offline Former Zimbran
    Join Date
    Feb 2006
    Location
    Pune, India
    Posts
    294
    Rep Power
    9

    Default

    1. I started adding events to the default "Calendar" in ZCS Web UI.

    2. I then ran the curl .... command as described above. (The file I used for uploading was named IndiaHolidays.ics).

    Result: The default calendar file was completely substituted by this new file.

    3. With same expectations, I tried to upload IndiaGovHolidays.ics

    Result:
    This only added those events which did not exist in IndiaHolidays.ics.

    4. I then, locally, modified IndiaHolidays.ics and tried to upload it.

    Result: It gave me the following error:

    Code:
    <html><head><title>Apache Tomcat/5.5.15 - Error report</title><style><!--H1
    {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
    H2
    {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
    H3
    {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
    BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
    B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
    P
    {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
    {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
    </head><body><h1>HTTP Status 500 - </h1><HR size="1"
    noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
    <u></u></p><p><b>description</b> <u>The server encountered an internal error
    () that prevented it from fulfilling this request.</u></p><p><b>exception</b>
    <pre>javax.servlet.ServletException: invalid request: Changing organizer of an
    appointment is not allowed: old=(unspecified), new=
    		com.zimbra.cs.service.UserServlet.doPost(UserServlet.java:465)
    		javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    		com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:173)
    		javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    </pre></p><p><b>root cause</b> <pre>com.zimbra.cs.service.ServiceException:
    invalid request: Changing organizer of an appointment is not allowed:
    old=(unspecified), new=
    		com.zimbra.cs.service.ServiceException.INVALID_REQUEST(ServiceException.java:181)
    		com.zimbra.cs.mailbox.Appointment.processNewInviteRequestOrCancel(Appointment.java:604)
    		com.zimbra.cs.mailbox.Appointment.processNewInvite(Appointment.java:576)
    		com.zimbra.cs.mailbox.Appointment.processNewInvite(Appointment.java:552)
    		com.zimbra.cs.mailbox.Mailbox.addInvite(Mailbox.java:2964)
    		com.zimbra.cs.service.formatter.IcsFormatter.saveCallback(IcsFormatter.java:130)
    		com.zimbra.cs.service.formatter.Formatter$SaveOperation.callback(Formatter.java:273)
    		com.zimbra.cs.operation.Operation.schedule(Operation.java:190)
    		com.zimbra.cs.service.formatter.Formatter.save(Formatter.java:104)
    		com.zimbra.cs.service.UserServlet.doPost(UserServlet.java:458)
    		javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    		com.zimbra.cs.servlet.ZimbraServlet.service(ZimbraServlet.java:173)
    		javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
    available in the Apache Tomcat/5.5.15 logs.</u></p><HR size="1"
    noshade="noshade"><h3>Apache Tomcat/5.5.15</h3></body></html>
    5. Next, I created a new std.ics locally, adding my birthday. Tried to upload it.

    Result: Added an event in the existing Calendar.

    6. Then, I edited this std.ics - added a yearly recuring event using KOrganizer. I tried to upload the std.ics.

    Result: No problems. Added the event to the calendar.

    7. I, then, deleted this yearly recurring event from my local calendar. Ran curl.

    Result: No effect.

    Co(ncl|f)usion:

    Generally, it will only Add to the Calendar.

    BTW: (How) Can I always replace the Calendar? Like it happened first. This will allow Deleting the existing events when I delete them locally. :-)
    Regards,

    Chintan Zaveri
    (Yet another ZIMBRAN!)

    "Dhundhne par Bhagwan bhi ..."

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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