As of ColdFusion (2021 release), CORBA has been removed. You can no longer use CORBA-related features, functions, and tags.
Does either of the following:
Returns what is returned by the invoked method.
ColdFusion 10: Added this function
invoke(instance, methodname [, arguments])
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. |
Invoke a method on Component
<cfscript> obj = createObject("component","TestComponent"); invoke(obj,"function1",{a1="ColdFusion"}); </cfscript>
Invoke methods on a webservice
<cfscript> obj = createObject("webservice","http://somedomain/test.cfc?wsdl"); //Invoke foo result = invoke(obj,"foo",{arg1="ColdFusion"}); //Invoke bar with two arguments, passing the second argument as null. result = invoke(obj, "bar", {arg1="ColdFusion", arg2=javacast("null", "")}); </cfscript>
Sign in to your account