Status/Resolution/Reason: Needs Review//
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/19/2015
Components: Language, WDDX Serialization
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Normal / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 0
input containing XML object breaks cfwddx
Repro:
<cfxml variable="myXML"><myXML>foo</myXML></cfxml>
<cfset myVar = {lastName="no", myQuery=queryNew("myColumn", "integer", [[1]]), myXML=myXML}>
<cfwddx action="cfml2wddx" input="#myVar#" output="myWDDX">
<cfdump var="#myWDDX#">
Actual result: exception "Object Type coldfusion.xml.XmlNodeList is not supported for this operation. Pass object as String."
Expected result: WDDX variable containing XML
Workaround 1: Change myXML=myXML to myXML=toString(myXML) as per the "Pass object as String" message in the exception. However, this is not realistic for already-existing code having complex nested structures w/ values being set throughout multiple locations.
Workaround 2: Use serializeJSON(). However, this is not a valid workaround for existing systems that use WDDX due to stuff like: 1) serializeJSON() loses query column types. Custom serializers are not a valid workaround for that when dealing w/ various complex nested structures. 2) It changes string "no" to boolean false.
Verified in CF11 Update 7 (build 11,0,07,296330).
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4101845
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
Attachments:
Comments: