可以使用 New 运算符在CFScript中创建Web服务吗?
与CreateObject相反..
Application.UserWebService = CreateObject("webservice", "http://WebServiceURL/WebServices/UserService.asmx?WSDL");
看看CF文档,我看到的唯一一个是使用CreateObject ..
<cfscript> ws = CreateObject("webservice", "http://www.xmethods.net/sd/2001/TemperatureService.wsdl"); xlatstring = ws.getTemp(zipcode = "55987"); writeoutput("The temperature at 55987 is " & xlatstring); </cfscript>
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78b4.html
不可以. new 运算符仅适用于组件,Web服务不是组件 .
new
FWIW,您可以查看 {cfroot}\CustomTags\com\adobe\coldfusion 目录,了解哪些核心对象是作为组件实现的 .
{cfroot}\CustomTags\com\adobe\coldfusion
2 回答
看看CF文档,我看到的唯一一个是使用CreateObject ..
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78b4.html
不可以.
new
运算符仅适用于组件,Web服务不是组件 .FWIW,您可以查看
{cfroot}\CustomTags\com\adobe\coldfusion
目录,了解哪些核心对象是作为组件实现的 .