tracker issue : CF-3864527

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Doc Bug for: invoke() doc includes statement "Invokes a web service"

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 12/09/2014

Components: Documentation

Versions: 11.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

invoke() doc includes statement "Invokes a web service". That statement should be removed, since using invoke() for web services throws error:

"Could not find the ColdFusion component or interface http://www.domain.com/MyCFC.cfc?wsdl."

Repro:

MyCFC.cfc
---------
component {remote string function myFunction(required string arg1, string arg2="b") {return ARGUMENTS.arg2;}}

index.cfm
---------
<cfscript>
  myResult = invoke("http://www.domain.com/MyCFC.cfc?wsdl", "myFunction", {arg1="a", arg2=javaCast("null", "")});
  writeDump(myResult);
</cfscript>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3864527

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments:

invoke() does support incoking webservice. The above usage is incorrect. You have to create an object and then pass the object in invoke method. The signature for invoke is invoke(instance, methodname, arguments)
Comment by Rupesh K.
9570 | December 09, 2014 04:29:09 AM GMT
The invoke() doc says: "Invokes a web service" That's incorrect and should be changed to: "Invokes a method on a web service object" Thus, it fails to do what <cfinvoke> can do regarding web services.
Comment by External U.
9571 | December 09, 2014 07:12:44 PM GMT
I don't agree with the argument here. Invoking web service obviously means invoking a method on it. The intention for invoke() is not to replicate cfinvoke tag. Its intention is to dynamically invoke method on an object which it does.
Comment by Rupesh K.
9572 | December 10, 2014 12:22:40 AM GMT
Hi Rupesh, What I meant was: <cfinvoke> doc says: - 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. invoke() doc says: - Invokes a web service Since invoke() was added after <cfinvoke> (and esp if it's not meant to replicate <cfinvoke>), then invoke()'s doc should clarify that it only invokes but doesn't instantiate. Suggested wording: "Invokes a method on an instantiated web service object." Thanks!, -Aaron
Comment by External U.
9573 | December 10, 2014 03:54:42 AM GMT