User Guide

208 Chapter 2: ColdFusion Tags
cfinvoke
Description
Does either of the following:
Invokes a component method from within a ColdFusion page or component.
Invokes a web service.
This tag works as follows:
Transiently instantiates a component or web service and invokes a method on it
Invokes a method on an instantiated component or web service
This tag can pass parameters to a method in the following ways:
With the cfinvokeargument tag
As named attribute-value pairs, one attribute per parameter
As a structure, in the argumentCollection attribute
Category
Extensibility tags
Syntax
<!--- Syntax 1 - this syntax invokes a method of a component. --->
<cfinvoke
component = "component name or reference"
method = "method name"
returnVariable = "variable name"
argumentCollection = "argument collection"
...>
OR
<!--- Syntax 2 - this syntax can invoke a method of a component only
from within the component. --->
<cfinvoke
method = "method name"
returnVariable = "variable name"
argumentCollection = "argument collection"
...
>
OR
<!--- Syntax 3 - this syntax invokes a web service. --->
<cfinvoke
webservice = "URLtoWSDL_location"
method = "operation_name"
username = user name"
password = "password"
timeout = "request timeout in seconds"
proxyServer = "WSDL proxy server URL
proxyPort = "port on proxy server"
proxyUser = "user id for proxy server"
proxyPassword = "password for proxy server"