<cfinvoke>
Invokes component methods from within a page or component.
Use this tag to reference a WSDL file and consume a web service from within a block of CFML code.
This tag may have a body.
This tag is also supported within <cfscript>
<cfinvoke
component=any
method=string
returnVariable=string
username=string
password=string
webservice=string
timeout=number
proxyServer=string
proxyPort=number
proxyUser=string
proxyPassword=string
servicePort=string
><!--- body --->[</cfinvoke>]
| Attribute | Description |
|---|---|
component
any, optional
|
edit
String or component object; a reference to a component, or component to instantiate. |
method
string, optional
|
edit
Name of a method. For a web service, the name of an operation. |
returnVariable
string, optional
|
edit
Name of a variable for the invocation result. |
username
string, optional
|
edit
Overrides username specified in Administrator > Web Services |
password
string, optional
|
edit
Overrides password specified in Administrator > Web Services |
webservice
string, optional
|
edit
The URL of the WSDL file for the web service. |
proxyServer
string, optional
|
edit
The proxy server required to access the webservice URL. |
proxyPort
number, optional
|
edit
The port to use on The proxy server. |
proxyUser
string, optional
|
edit
The user ID to send to the proxy server. |
proxyPassword
string, optional
|
edit
The user's password on the proxy server. |
Unimplemented Attribute(s)
| Attribute | Description |
|---|---|
timeout
number,
optional
|
edit
The timeout for the web service request, in seconds * unimplemented * |
servicePort
string,
optional
|
edit
The port name for the web service. This value is case-sensitive and corresponds to the port element's name attribute under the service element. Specify this attribute if the web service contains multiple ports. Default: first port found in the WSDL. * unimplemented * |
Examples
edit<cfinvoke component="file.componentName" method="methodName" returnVariable="result" />
<cfdump var="#result#" />
See also
- Components (CFCs)
- Invoke()
- <cfcomponent>
- <cfinvokeargument>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)