second part to my question... i pass xml to the cfc (verified that it is xml by using isxml) once it gets to my cfc I do a isxml() and it says NO?! I tried using cfxml and xmlformat to try to get it back to xml but not having any luck. i need it in xml to parse out and dump into a table. Please help!
Thanks, tim -----Original Message----- From: Tim Do [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 16, 2007 2:56 PM To: CF-Talk Subject: RE: An error occured while Parsing an XML document You know what's weird... I tried return type as string it gave me this error: when i change it to string i get: faultString: org.xml.sax.SAXException: Bad types (class java.lang.String -> interface org.w3c.dom.Document) but when I changed to to "any" it worked fine. And now when I change it back "string" it still works. Wtf?! Thanks! -----Original Message----- From: Josh Nathanson [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 16, 2007 2:48 PM To: CF-Talk Subject: Re: An error occured while Parsing an XML document > 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> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291292 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

