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>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291288
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to