tracker issue : CF-3041414

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

Bug 82819:Passing arguments

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Phil Haeusler / Phil Haeusler (phil haeusler)

Created: 05/06/2010

Components: Language, CF Component

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 / 274366

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Mac 10 All

Vote Count: 0

Problem:

Passing arguments.missingMethodArguments to a remote web service in onMissingMethod causes a java.lang.IllegalArgumentException: argument type mismatch error
Method:

[vmannebo 5/8/10]
\\blrfs04.macromedia.com\builds\coldfusion\bugs\82819
(run .cfm file, file different from user's file)



Under CF9 arguments.missingMethodArguments struct can no longer be passed to a remote web service call.  ColdFusion returns an argument type mismatch java exception.  In the following sample code, the solution is to Duplicate(arguments.missingMethodArguments) prior to calling the remote web service call.This is a new bug introduced by CF9 and breaks code that works on CF8.


Test.cfm
<cfset o = CreateObject("component", "LocalService")>
<cfoutput>#o.test("x", "y")#</cfoutput>

LocalService.cfc
<cfcomponent>
<cffunction name="onMissingMethod">
<cfargument name="missingMethodName" type="string" required="true">
<cfargument name="missingMethodArguments" type="struct" required="true">
<cfset ro = CreateObject("webservice", "http://localhost/RemoteService.cfc?wsdl")><cfreturn ro.send(method=arguments.missingMethodName, methodArgs=arguments.missingMethodArguments)>
</cffunction>
</cfcomponent>


RemoteService.cfc
<cfcomponent>
<cffunction access="remote" name="send" returntype="string">
<cfargument name="method" type="string" required="true">
<cfargument name="methodArgs" type="struct" required="true">
<cfreturn "Calling " & arguments.method & " args[" & arguments.methodArgs.toString() & "]">
</cffunction>
</cfcomponent>
Result:

java.lang.IllegalArgumentException: argument type mismatchat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at coldfusion.xml.rpc.ServiceProxy.invokeImpl(ServiceProxy.java:224)at coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:154)at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)

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

Watson Bug ID:	3041414

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: Phil Haeusler
External Customer Email: 361F280E425B9CD5992015D5
External Test Config: 05/06/2010

Attachments:

Comments: