cfinvoke

Coldfusion WSDL IllegalArgumentException on cfinvokeargument

主宰稳场 提交于 2019-12-24 01:47:07
问题 When you are calling a method of a webservice and want to omit an unrequired numeric variable that has a default value set coldfusion will throw the following error: The fault returned when invoking the web service operation is:<br> <pre>'' java.lang.IllegalArgumentException</pre> Example: <cfinvoke webservice = "http://*.cfc?WSDL" method="getFriendlyDay" returnvariable="response" refreshWSDL="true" > <cfinvokeargument name="dayNumber" omit="true"/> </cfinvoke> webservice component:

What is the difference between using cfinvoke and createObject to run a component function?

帅比萌擦擦* 提交于 2019-12-23 09:26:53
问题 In my company's code, I've often seen component files used by initializing an object of that component and calling the methods off the object. However, it seems to me somewhat more straightforward to use the cfinvoke method, especially when only using one method from the component file. What are the differences between these 2 methods of calling a component function and what are the pros/cons of each? When should I use which? 回答1: cfinvoke can only be used in tags. createObject can be used in