如何在coldfusion中实现webservice?

时间:2012-02-27 06:12:26

标签: web-services coldfusion

如何实现用于在coldfusion中导出订单的Web服务?这意味着不是将订单导出为xls,而是将其导出为Web服务。
感谢
基肖尔

1 个答案:

答案 0 :(得分:6)

在coldfusion中执行此操作的最简单方法是创建一个CFC,其中要显示到外部世界的函数具有“access”属性的“remote”值,这将生成SOAP web服务。

如何执行此操作的示例(改编自CF文档here):

<cfcomponent> 
    <cffunction name="echoString" access="remote" returnType="string" output="false"> 
        <cfargument name="input" type="string"> 
        <cfreturn arguments.input> 
    </cffunction> 
</cfcomponent>

有关如何使用内置网络服务功能的更多信息,请访问here