It sounds like an error I've gotten when I've had spaces or comments before
the initial ?xml declaration. Try triming the filecontent.

Blair

On Jan 23, 2008 2:54 PM, Ian Marshall <[EMAIL PROTECTED]> wrote:

> Hi Everyone,
>
> I have an application that has been working quite nicely for over a year
> now that allows users to buy tickets for a music festival.
> But now I am getting an error when XML is returned from the payment
> gateway we use for processing credit card transactions.
>
> This is the error message: "An error occured while Parsing an XML
> document. Content is not allowed in prolog."
>
> This does not happen with every transaction only about one in five.
>
> The payment gateway hasn't changed anything, nor have I — it just started
> throwing this error.
>
> This is the code where the error occurs, specifically the line "XMLobj =
> XmlParse(cfhttp.fileContent);":
>
> <cfscript>
> /* parse the response from eway (which is an XML document), this will
>    convert it into an XML object for easy access to its values */
> XMLobj = XmlParse(cfhttp.fileContent);
>
> /* set eway vars from the response XML object */
> ewayTrxnStatus = XMLobj.ewayResponse.ewayTrxnStatus.XmlText;
> ewayTrxnNumber = XMLobj.ewayResponse.ewayTrxnNumber.XmlText;
> ewayTrxnReference = XMLobj.ewayResponse.ewayTrxnReference.XmlText;
> ewayTrxnOption1 = XMLobj.ewayResponse.ewayTrxnOption1.XmlText;
> ewayTrxnOption2 = XMLobj.ewayResponse.ewayTrxnOption2.XmlText;
> ewayTrxnOption3 = XMLobj.ewayResponse.ewayTrxnOption3.XmlText;
> ewayAuthCode = XMLobj.ewayResponse.ewayAuthCode.XmlText;
> ewayReturnAmount = XMLobj.ewayResponse.ewayReturnAmount.XmlText;
> ewayTrxnError = XMLobj.ewayResponse.ewayTrxnError.XmlText;
> </cfscript>
>
> any ideas?
>
> cheers
> Ian
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to