I've got an E4X HTTPService in Flex that is calling a servlet which returns an 
XML 
document. Approximately 80% of the time, the servlet works fine and the 
HTTPService 
result is a valid XML doc -- the rest of the time, the HTTPService is giving me 
a fault:

[RPC Fault faultString="Error #1088: The markup in the document following the 
root 
element must be well-formed." faultCode="Client.CouldNotDecode" 
faultDetail="null"]

After taking a look at the servlet directly in the browser (removing Flex from 
the equation), 
I have not noticed any issue with the XML returned and we have run it through 
several 
online validation tools. The servlet code that generated the XML is fine as 
well, we have 
checked that numerous times.

I thought that the problem might be the resultFormat of the HTTPService 
(currently E4X), 
so I changed it to 'text' so I could see if there was any special characters or 
issues with the 
XML after Flex called the servlet. I discovered that there are seemingly random 
special 
characters being appended to the end of the document (after the end tag). The 
string of 
random special characters ranges from 2-10 in length.

Note: I have since put the resultFormat of the HTTPService back to e4x.

Does anybody have any idea why this might be happening? We have observed this 
on 
Windows, OS X and Ubuntu Linux platforms, in IE7, Safari, Firefox (Mac) and 
Firefox 
(Ubuntu).

Thanks for your help,

Brian



Reply via email to