Summary:

Version: 7.1c
Language: English
Area: Exchange Integration

Issue:

Steps to Reproduce:

1. Create a new appointment in Outlook. Make sure that it contains a Unicode control character (eg &#x1E).
2. Synch.

Actual result (please include text of any error message):

2012-02-19/14:07:39.721/MEZ [Sync Source APPOINTMENT Queue Thread] WARN org.apache.cxf.common.logging.LogUtils.doLog Interceptor for {http://schemas.microsoft.com/exchange/services/2006/messages}ExchangeServices#{http://schemas.microsoft.com/exchange/services/2006/messages}GetItem has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unmarshalling Error: ParseError at [row,col]:[17,32]
Message: Character reference "&#x1E" is an invalid XML character.
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:764)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:195)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:672)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2210)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2087)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1985)
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
at $Proxy57.getItem(Unknown Source)
at com.sage.scrm.syncengine.exchange.ews.service.SageExchangeService.getItems(SageExchangeService.java:721)
at com.sage.scrm.syncengine.exchange.ews.service.SageExchangeService.getItems(SageExchangeService.java:679)
at com.sage.scrm.syncengine.exchange.ews.service.SageExchangeService.getItems(SageExchangeService.java:653)
at com.sage.scrm.syncengine.exchange.ews.service.SageExchangeService.getItem(SageExchangeService.java:626)
at com.sage.scrm.syncengine.exchange.ews.sdata.sync.SyncSourceAppointmentsManager.getSyncActionForResource(SyncSourceAppointmentsManager.java:204)
at com.sage.scrm.syncengine.exchange.ews.sdata.sync.SyncSourceManagerBase$SyncSourceQueueThread.fillSyncResourceIds(SyncSourceManagerBase.java:948)
at com.sage.scrm.syncengine.exchange.ews.sdata.sync.SyncSourceManagerBase$SyncSourceQueueThread.fillSyncResourceIds(SyncSourceManagerBase.java:815)
at com.sage.scrm.syncengine.exchange.ews.sdata.sync.SyncSourceManagerBase$SyncSourceQueueThread.run(SyncSourceManagerBase.java:790)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[17,32]
Message: Character reference "&#x1E" is an invalid XML character.]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:749)
... 28 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[17,32]
Message: Character reference "&#x1E" is an invalid XML character.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(Unknown Source)
... 31 more

Expected result:

More info:

It looks like EWS is declaring itself as conforming to the XML 1.0 spec, but it actually conforming to the XML 1.1 spec. This causes an issue when we try to synch and someone has included one of these characters in the appointment body.

Resolution:

Enable CXF logging to find the problem record and edit/delete it. The problem record will not be displayed in the user logs, so this is raised as a usability issue.

CXF loggign can be enabled by setting the following lines to DEBUG in ..\CRM\tomcat\webapps\crmExchangeSyncEndine\WEB-INF\log4j.properties.

#cxf logging
log4j.logger.org.apache.cxf=ERROR, cxfgeneral
...

#cxf logging inbound traffic
log4j.logger.org.apache.cxf.interceptor.LoggingInInterceptor=ERROR, ininterceptor
...

#cxf logging outbound traffic
log4j.logger.org.apache.cxf.interceptor.LoggingOutInterceptor=ERROR, outinterceptor