Error when returning xml document from cfc
I am creating a dynamic xml document in a cfc and returning it back to the
calling page. I am getting the following error:
An error occured while Parsing an XML document. The processing instruction
target matching "[xX][mM][lL]" is not allowed. <br>The error occurred on
line 65.
I'm not trying to process the xml document. All I'm doing is creating the
document, before sending it to a web service.
Calling the method:
<cfset tcuvXML = tcuvObj.getTCUVXml(inventory[i].oem_key,temp1Array,i)>
The method:
<cffunction name="getTCUVXml" access="public" returntype="xml"
returnformat="plain">
<cfargument name="dealer_code" required="true" type="string" />
<cfargument name="vinsArray" required="true" type="array" />
<cfargument name="counter" required="true" type="numeric" />
<cfset var tzInfo = #getTimeZoneInfo().utcHourOffset#>
<cfset var gmtDate = #dateFormat(now(), "yyyy-mm-dd")#>
<cfset var gmtTime = "T" & #timeFormat(now(), "HH:MM:SS")# & "-0" &
#tzinfo# & ":00">
<cfset var gmt = #gmtDate# & #gmtTime#>
<cfset var uuidLibObj = createObject("java", "java.util.UUID")>
<cfset var guidStr = uuidLibObj.randomUUID().tostring()>
<cfoutput>
<cfsavecontent variable="tcuvXML">
EXCLUDING THE ACTUAL DOCUMENT FOR SPACE
</cfsavecontent>
</cfoutput>
<cfreturn tcuvxml>
</cffunction>
If the actual xml document is needed, I'll post it. I excluded it because
of the length.
No comments:
Post a Comment