Thanks Peter I have implemented the URLLoader method as suggested, and unfortunately I am still experiencing the same issues.
I'm really starting to think this could be on the Java end of things -- anybody have any insight there? We have set the character encoding of the servlet to UTF-8 explicitly, and we have the content type set to text/xml. Thoughts? Thanks, Brian --- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]> wrote: > > If you're not using the proxy, then HTTPService is ultimately using > flash.net.URLLoader to load and receive the data. You could try to take Flex out of the equation for a second and try the raw URLLoader API to see if it still occurs there. > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Dunphy > Sent: Monday, March 05, 2007 3:29 PM > To: flexcoders@yahoogroups.com > Subject: Re: [flexcoders] Special characters after end tag of XML document > (HTTPService issue) > > > > Peter, > > I have not made any changes to the XML.ignoreWhitespace property. > > I have implemented the trim as suggested, and I have also put a check > to see if the last character of the string is a > (a quick way to see > if there's trailing junk characters). > > What I'm experiencing now is the same issue as before, however now I > can see the trailing characters traced in my flashlog. Just as a > sample, `á!àê!àî!`á! ï! appears at the end of one of them. > > I have noted that we are experiencing this with more than one servlet > at this point, it appears that all of the servlets in our application > might be affected. > > Any other thoughts/suggestions? > > Thanks again, > > Brian > > On 3/5/07, Peter Farland <[EMAIL PROTECTED] <mailto:pfarland%40adobe.com> > > wrote: > > > > > > > > > > > > > > > > Perhaps your special characters trailing the document are whitespace (tabs, > > new lines, etc)? > > > > There are known issues with constructing an XML instance (the basis for E4X) > > from Strings containing whitespace between processing instructions and the > > start of the root element (or trailing whitespace after the root element) > > and with XML.ignoreWhitespace set to false. > > > > Have you by any chance set XML.ignoreWhitespace to false? > > > > If so, for your particular scenario of trailing special characters you could > > keep HTTPService's resultFormat as "text" to get it as a raw String, then > > use mx.utils.StringUtil.trim() on the String, and then construct a new XML > > instance from your String new XML(result). > > > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > > Behalf Of klumikaze > > Sent: Monday, March 05, 2007 2:40 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Special characters after end tag of XML document > > (HTTPService issue) > > > > > > > > > > > > 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 > > > > > > > > > > -- > Brian Dunphy >