none
[EWS Java API 1.1][JAVA] RRS feed

  • Question

  • HI,

    I am using EWS Java API 1.1, I am using Pull notification for the event handling. 

    From the example, I can only get calendar appointment Subject from the event, is there way to get the 

    calendar appointment start time and end time from the Pull Notification event.

     

    Thanks very much

    Nick

     

    //5 mins

    PullSubscription subscription = service.subscribeToPullNotifications(folder,5,

                                                                null,

                                                                EventType.Created,

                                                                EventType.FreeBusyChanged,

                                                                EventType.NewMail);

     

    System.out.println("Thread.sleep");

    Thread.sleep(1000*60*1);

     

    // Wait a couple minutes, then poll the server for new events.   

    GetEventsResults events = subscription.getEvents();

    //subscription.unsubscribe();

    System.out.println("subscription.getEvents()");

    for (ItemEvent itemEvent : events.getItemEvents()) {

    System.out.println("#### itemEvent ####");

    if (itemEvent.getEventType() == EventType.Created) {

    String itemId = itemEvent.getItemId().getUniqueId();

    System.out.println(itemId);

    }

    }

     

    List<ItemId> newMailsIds = new ArrayList<ItemId>();

     

    for (ItemEvent itemEvent : events.getItemEvents()) {

     

    newMailsIds.add(itemEvent.getItemId());

     

    }

    ServiceResponseCollection<GetItemResponse> responses = service

    .bindToItems(newMailsIds, new PropertySet(ItemSchema.Subject));

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

     

    // this.listBox1.Items.Add(string.Format("{0} new mail(s)",

    // newMailsIds.Count));

     

    for (GetItemResponse response : responses) {

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

    System.out.println("subject======="

    + response.getItem().getSubject());

    // Console.WriteLine("subject====" + response.Item.Subject);

    }

    Thursday, August 18, 2011 1:49 PM