Contact.getNotes() always return null
Hi,
I'm using ews-java-api to get some contact details. I can get everything I need except for notes. No matter what I write in the note field, the api return me a null string.
I test it with Exchange 2010 OWA.
Thanks !
Could you attach a trace listener to the ExchangeService and see if the notes are in the XML returned from the Exchange Server?
I activated the trace listener but I can't find how to use it, even by looking at the code...
Something like the following:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZone.getTimeZone("UTC"));
service.setTraceEnabled(true);
service.setTraceListener(new ITraceListener() {
@Override
public void trace(String traceType, String traceMessage) {
System.out.println(traceMessage);
}
});
Ok testing with trace listener showed me that note content was returned but in the body. So using contact.getBody() did the trick. So what is contact.getNotes() purpose ?
I'm afraid I'm not sure. Sounds like the server is serializing a contact's notes into the wrong XML field.