EWS - How to get isRecurring info in GetItemResponse

480 views Asked by At

I am using EWS API in Java for Exchange Server communication. I have subscribed to Exchange server with stream subscription for Calendar folder. I am getting notifications when a meeting is created and sent to me. I wonder, if I can learn in the code the isRecurring data for this meeting. When I use getUserAvailability service, it provides this data. Can I get it also in my structure?

For ItemEvents:

// Now retrieve the Subject property of all the new mails in one call to EWS
ServiceResponseCollection<GetItemResponse> responses = service.bindToItems(
                       newMailsIds,
                       new PropertySet(ItemSchema.Subject, ItemSchema.MimeContent, ItemSchema.Body));

System.out.println("count=======" + responses.getCount());

for(GetItemResponse response : responses)
{
  System.out.println("count=======" + response.getClass().getName());
  System.out.println("subject=======" + response.getItem().getSubject());
  System.out.println("body=======" + response.getItem().getBody());
  System.out.println("mimecontent=======" + response.getItem().getMimeContent().toString());

  //Iterator itr = response.getItem().getExtendedProperties().iterator();
  //while (itr.hasNext()) 
  //{
  //    System.out.println("ExtendedProperties=======" + itr.next().toString());
  //}
}
1

There are 1 answers

0
Devarsh On

As you are subscribing to Calendar-Folder only, then instead you can directly bind it to Appointment object ::

  Appointment appointment = Appointment.bind(service, itemEvent.getItemId() , 
                     new PropertySet( AppointmentSchema.Subject, AppointmentSchema.Body,AppointmentSchema.IsRecurring ) );