You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Axis User <ax...@excitor.com> on 2008/06/23 15:07:50 UTC
com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion
character (code 0x1) not a valid XML character
Hi All,
I'm developing a WS client that communicates with Microsoft Exchange Web
Service (EWS), however at several occasions I have experienced that the
response from EWS contains characters that are illegal within XML (at
least according to Apache Axis2 and also how I/we undertsand the XML
specs). It seems to be related to unicode control characters (range x1 -
x1F).
This problem may be related to the fact that EWS return xml version 1.0
(according to the XML) but maybe (just maybe) what is returned is in fact
adhering to the XML 1.1 spec (which does allow unicode control characters)
- please see attached example (XML version highlighted in blue - invalid
character highlighted by red). Is it possible to instruct Axis to treat
the response XML as 1.1 regardless of the specified version in the XML?
and do you think that will solve the problem?
Any idea as to how I can get Axis to accept there illegal characters?
Regards
Mads
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<t:ServerVersionInfo MajorVersion="8" MinorVersion="1"
MajorBuildNumber="263" MinorBuildNumber="0"
Version="Exchange2007_SP1" xmlns:t="
http://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<m:GetItemResponse
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseMessages>
<m:GetItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:Message>
<t:ItemId
Id="AAMkADllNTA4YmRjLTgxNTUtNDI3Ny1hZmJkLTU0ODU1NmE0OTAyZQBGAAAAAAChRyxXbJOzTbVl0M0I60jDBwBV+bBUA6OzRITxsDtfENDqAADMEyUvAABV+bBUA6OzRITxsDtfENDqACECYJ2QAAA="
ChangeKey="CQAAABYAAABV+bBUA6OzRITxsDtfENDqACECYhe0" />
<t:ParentFolderId
Id="AAMkADllNTA4YmRjLTgxNTUtNDI3Ny1hZmJkLTU0ODU1NmE0OTAyZQAuAAAAAAChRyxXbJOzTbVl0M0I60jDAQBV+bBUA6OzRITxsDtfENDqAADMEyUvAAA="
ChangeKey="AQAAAA==" />
<t:Subject>
[RealTime Service] Error has occured
</t:Subject>
<t:Body BodyType="Text">
thr ead:2424, process:1392, mem:28Mb,VM:28Mb Dump of exception type
'System.Data.SqlClient.SqlException'
Message: SQL Server does not exist or
access denied. Stack trace:
at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isIn Transaction)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()
at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DBCommandWrappercommand)
at
AddOn.Configuration.ConfigurationManager.GetRtsSynchronization(GuidrtsId)
at AddOn.Configuration.ConfigurationManager.(Object)
</t:Body>
<t:DateTimeReceived>
2008-06-12T03:10:07Z
</t:DateTimeReceived>
<t:Importance>Normal</t:Importance>
<t:IsDraft>false</t:IsDraft>
<t:DateTimeSent>
2008-06-12T03:08:18Z
</t:DateTimeSent>
<t:DateTimeCreated>
2008-06-12T03:10:07Z
</t:DateTimeCreated>
<t:HasAttachments>false</t:HasAttachments>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="0x6707"
PropertyType="String" />
<t:Value>
/Inbox/[RealTime Service] Error has occured-7.EML
</t:Value>
</t:ExtendedProperty>
<t:Sender>
<t:Mailbox>
<t:Name>
sa-realtime@domain.com
</t:Name>
<t:EmailAddress>
sa-realtime@domain.com
</t:EmailAddress>
<t:RoutingType>SMTP</t:RoutingType>
</t:Mailbox>
</t:Sender>
<t:ToRecipients>
<t:Mailbox>
<t:Name>sysadm</t:Name>
<t:EmailAddress>
sysadm@domain.com
</t:EmailAddress>
<t:RoutingType>SMTP</t:RoutingType>
</t:Mailbox>
</t:ToRecipients>
<t:From>
<t:Mailbox>
<t:Name>
sa-realtime@domain.com
</t:Name>
<t:EmailAddress>
sa-realtime@domain.com
</t:EmailAddress>
<t:RoutingType>SMTP</t:RoutingType>
</t:Mailbox>
</t:From>
<t:IsRead>false</t:IsRead>
</t:Message>
</m:Items>
</m:GetItemResponseMessage>
</m:ResponseMessages>
</m:GetItemResponse>
</soap:Body>
</soap:Envelope>