I'm doing a webservices call and having some troubles.
Here's the code in my cfc:
<cfcomponent
displayName="Detail of an Individual Account"
hint="Returns the detail of a single individual account" >
<cffunction
name="IndividualAccountDetail"
output="false"
access="remote"
displayname="Detail of an Individual Account"
hint="Returns the detail of a single individual account"
returntype="string">
<cfxml variable="IndividualAccounts">
<IndividualAccounts>
<firstname>John</firstname>
<lastname>Smith</lastname>
<IndividualAccounts>
<cfset unParsedXML="#IndividualAccounts#">
<cfreturn unParsedXML>
</cffunction>
</cfcomponent>
----------------------------------------------------------
In my base page I call the CFC from
here's the relevant code:
<cfinvoke webservice="#application.siteurl#/WebServices/IndividualAccountDetail.cfc?WSDL">
returnvariable="userDetail"
method="IndividualAccountDetail" >
</cfinvoke>
<cfset temp=xmlParse(userDetail)>
<cfdump var="#temp#">
------------------------------------
I get the following error:
Document root not found
If I comment out the xmlparse(userdetail) line, the cfdump returns 'coldfusion.xml.XmlNodeList@2daf89'.
I have no idea why I'm getting that error? Is my XML invalid or something?
Thanks in advance for any help.
Here's the code in my cfc:
<cfcomponent
displayName="Detail of an Individual Account"
hint="Returns the detail of a single individual account" >
<cffunction
name="IndividualAccountDetail"
output="false"
access="remote"
displayname="Detail of an Individual Account"
hint="Returns the detail of a single individual account"
returntype="string">
<cfxml variable="IndividualAccounts">
<IndividualAccounts>
<firstname>John</firstname>
<lastname>Smith</lastname>
<IndividualAccounts>
<cfset unParsedXML="#IndividualAccounts#">
<cfreturn unParsedXML>
</cffunction>
</cfcomponent>
----------------------------------------------------------
In my base page I call the CFC from
here's the relevant code:
<cfinvoke webservice="#application.siteurl#/WebServices/IndividualAccountDetail.cfc?WSDL">
returnvariable="userDetail"
method="IndividualAccountDetail" >
</cfinvoke>
<cfset temp=xmlParse(userDetail)>
<cfdump var="#temp#">
------------------------------------
I get the following error:
Document root not found
If I comment out the xmlparse(userdetail) line, the cfdump returns 'coldfusion.xml.XmlNodeList@2daf89'.
I have no idea why I'm getting that error? Is my XML invalid or something?
Thanks in advance for any help.