I'm trying to write a CF web service that will be publicly accessible and thus 
accessed by a variety of languages. This service will return multiple data 
values and I'm trying to figure out the best way to return this data. I've 
tried the following stub, which creates a complex data type and can be consumed 
by CF just fine, but not sure if this can be used by other languages. I'm 
trying C# code but cannot get any data back that works. Any ideas, code samples 
would be appreciated.

<!--- PropertyTaxes.cfc --->
<cfcomponent displayname="PropertyTaxes">
<cffunction name="getPropertyTax" returntype="treReturnStruct" access="remote" 
output="false">
        <cfset var propertyTax = "">
        <cfobject component="treReturnStruct" name="propertyTax">
        <cfset propertyTax.status = 1>
        <cfset propertyTax.message = "Success">
        <cfreturn propertyTax>
</cffunction>
</cfcomponent>

<!--- treReturnStruct.cfc --->
<cfcomponent output="no">
        <cfproperty name="status" type="numeric">
        <cfproperty name="message" type="string">
</cfcomponent>

<!--- test.cfm --->
<cfinvoke 
 webservice="http://localhost/webservices/PropertyTaxes.cfc?wsdl";
 method="getPropertyTax"
 returnvariable="taxInfo">
</cfinvoke>
<cfoutput>
#taxInfo.status#<br>
#taxInfo.message#<br>
</cfoutput>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235784
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to