Your Rating: Results: PatheticBadOKGoodOutstanding! 3 rates

Description

Does either of the following:

  • Invokes a component method from within a ColdFusion page or component
  • Invokes a method on an instantiated web service object
  • invokes a method on Java/.NET/COM/Corba object

Returns

Returns what is returned by the invoked method.

History

ColdFusion 10: Added this function

Syntax

invoke(instance, methodname [, arguments])

Properties

Parameter

Description

instance

Required.

For CFC : String or component object; a reference to a component, or component name/path to instantiate. Can be an empty string when invoking a method within the same ColdFusion page or component.

For webservice/Java/.NET/COM/Corba : object instance

methodname

Required. Name of a method. For a web service, the name of an operation.

arguments

Optional. Arguments to pass to the method.

Example

Invoke a method on Component

Invoke methods on a webservice

Labels
  • None
  1. Nov 14, 2014

    This doesn't work with web services. Any chance we could see an example of how that works?

  2. Dec 08, 2014

    +1 to Carlton's request.  When the web service example is added, please indicate how to pass nillable arguments.

    Thanks!,
    -Aaron


Searching ColdFusion, English documentation