Finally, I managed to fix the XML. Here is the fixed version.
Code:
<CreateAppointmentRequest xmlns="urn:zimbraMail">
<m>
<su>Test Appointment</su>
<e p="John" a="someone@gmail.com" t="t"></e>
<inv>
<comp fb="B" fba="B" name="Test appointment" allDay="1" isOrg="1">
<s d="20090917"></s>
<e d="20090917"></e>
<or a="jacky@zimbra-desktop.localdomain" d="Jacky"></or>
<at role="REQ" ptst="NE" d="John" rsvp="1" cutype="IND" a="somebody@gmail.com"></at>
</comp>
</inv>
</m>
</CreateAppointmentRequest> The documentation about email address type in
soap.txt line 661 for the TO is wrong. It should be "t" instead of "o". We can avoid this by using ToXML.EmailType.TO.toString() in Java code.