如何在coldfusion中实现webservice?

Kis*_*hor -2 coldfusion web-services

如何实现webservice在coldfusion中导出订单?
这意味着不是将订单导出为xls,而是将其导出为Web服务.
谢谢
Kishor

Mik*_*wen 6

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

如何执行此操作的示例(根据此处的CF文档改编):

<cfcomponent> 
    <cffunction name="echoString" access="remote" returnType="string" output="false"> 
        <cfargument name="input" type="string"> 
        <cfreturn arguments.input> 
    </cffunction> 
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

有关如何使用内置Web服务功能的更多信息,请参见此处.