ericaalicen
Programmer
I'm using cfinvoke to pass an xml structure to a cfc. This seems to work fine if I use cfdump to output the XML. But when I try to parse the XML, I get an error "An error occured while Parsing an XML document."
At the moment, I'm creating and parsing my own XML data. And the code I use to create and parse the data works, until I pass it through the webservice. I've tried enclosing the XML in a toString() and that doesn't work.
This is my invoke statement.
And here's the .cfc it's calling.
Any ideas?
At the moment, I'm creating and parsing my own XML data. And the code I use to create and parse the data works, until I pass it through the webservice. I've tried enclosing the XML in a toString() and that doesn't work.
This is my invoke statement.
Code:
<cfinvoke
webservice="[URL unfurl="true"]http://www.domain.com/temp/myComponent.cfc?wsdl"[/URL]
method="setBatch"
returnvariable="sService" header="#batchSummary#" myList="#myList#">
</cfinvoke>
And here's the .cfc it's calling.
Code:
<cfcomponent>
<cffunction name="setBatch" returnType="void" access="remote">
<cfargument name = "header" type = "xml">
<cfargument name = "myList" type = "xml">
<cfoutput>
<cfdump var="#arguments.header#">
<cfdump var="#arguments.myList#">
<cfset tempObj = Trim(arguments.myList)>
<!-- parse our xml data -->
<cfset mydoc = XmlParse(#tempObj#)>
</cfoutput>
</cffunction>
</cfcomponent>
Any ideas?