I've written a CFC code that I would like to access as a web service.
<cfcomponent>
<cffunction name="getDBList" access="remote" returntype="query">
<cfset qResults="">
<cfquery name="DBList" datasource="stewlib">
SELECT ARTICLE_ID, ARTICLE_NAME, ARTICLE_DESCRIPTION, ARTICLE_LINK
FROM LIBRARY.ARTICLE
ORDER BY ARTICLE_NAME ASC
</cfquery>
<cfreturn qResults>
</cffunction>
</cfcomponent>
It works just fine in DW, it's a pretty straight forward CFC. When I look at what the Service returns, it is a single array with all the data inside it. I've seen some other Web Services that send the results as a whole array and as individual fields as well. How can I change my code so that I can have ColdFusion send the individual field info as well? Thanks.
<cfcomponent>
<cffunction name="getDBList" access="remote" returntype="query">
<cfset qResults="">
<cfquery name="DBList" datasource="stewlib">
SELECT ARTICLE_ID, ARTICLE_NAME, ARTICLE_DESCRIPTION, ARTICLE_LINK
FROM LIBRARY.ARTICLE
ORDER BY ARTICLE_NAME ASC
</cfquery>
<cfreturn qResults>
</cffunction>
</cfcomponent>
It works just fine in DW, it's a pretty straight forward CFC. When I look at what the Service returns, it is a single array with all the data inside it. I've seen some other Web Services that send the results as a whole array and as individual fields as well. How can I change my code so that I can have ColdFusion send the individual field info as well? Thanks.