> I'm trying to pass xml into a webservice but I'm getting an "An error > occured while Parsing an XML document" error.
Tim - I think there is a problem, in that you are setting your cffunction "putTenants" returntype to "XML", but you're returning a plain string "success!". That string will not validate as XML. -- Josh ----- Original Message ----- From: "Tim Do" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Tuesday, October 16, 2007 2:27 PM Subject: An error occured while Parsing an XML document > Hi All, > > I'm trying to pass xml into a webservice but I'm getting an "An error > occured while Parsing an XML document" error. I'm using toXML to > convert a query result set into xml and passing it to the webservice. > I'm not sure whether it's the cfinvoke that is choking or is it the cfc > that is choking. I think it's the cfinvoke because on the cfc I took > out all the logic. > > Here is my code: > > <cfquery name="tenants" datasource="voyager"> > SELECT > scode,slastname,sfirstName,saddr1,saddr2,scity,sstate,szipcode > FROM voyager.dbo.tenant > WHERE (SLASTNAME = 'smith') AND (HPROPERTY = 141) > </cfquery> > > <cfset toXML = createObject("component", "toXML")> > <cfset XMLtenant = toXML.queryToXML(tenants, "tenantList", "tenant")> > > <cfset mydoc = XmlParse(#XMLtenant#)> > <cfdump var="#mydoc#"> > > <cfinvoke > webservice="http://insite/yardi/insurance/voyager/rentersInsNightlyUpdat > e.cfc?wsdl" returnvariable="XMLtenant" method="putTenants"> > <cfinvokeargument name="tenantsXML" value="#XMLtenant#)"> > </cfinvoke> > > > <cfdump var="#XMLtenant#"> > > > Here is my cfc: > > <cfcomponent displayname="TenantInsUpdate"> > > <cffunction name="putTenants" returntype="XML" access="remote"> > <cfargument name="tenantsXML" required="true" > type="string" default=""/> > > > > > <!--- Create and populate Object ---> > <cfset tenantCfc = "success!"> > > <cfreturn tenantCfc> > </cffunction> > > > </cfcomponent> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get involved in the latest ColdFusion discussions, product development sharing, and articles on the Adobe Labs wiki. http://labs/adobe.com/wiki/index.php/ColdFusion_8 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291286 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

