|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to call a web service and pass an array.
<cfset customerID = ArrayNew(1)> <cfset customerID[1] = 1> <cfset customerID[2] = 2> <cfset customerID[3] = 3> <cfset customerID[4] = 4> <cfdump var="#customerID#"> <cfinvoke webservice="something.cfc?wsdl" method = "getEmails" returnvariable="result"> <cfinvokeargument name="customerID" value="#customerID#"> </cfinvoke> and on the something.cfc, i have <cfargument name="customerID" type="array" required="true"> for some reason this call is returning the following error Could not perform web service invocation "getOptOutEmails" because java.lang.IllegalArgumentException: argument type mismatch if i use <cfinvokeargument name="customerID" value="1"> </cfinvoke> it works fine. what am i doing wrong ? thanks for the help in advance |
|
#2
|
|||
|
|||
|
That should work fine. Can you post the rest of the CFC that is receiving the web service call?
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
<cfcomponent displayname="...." hint="....">
<cffunction name="getEmails" access="remote" returntype="string"> <cfargument name="customerID" type="array" required="true"> <cfset custList = ArrayToList(CustomerID)> <cfquery name="getEmailList" datasource="..."> SELECT emailAddress FROM Customer WHERE CustomerID in (<cfqueryparam value="#custList#" list="yes">) </cfquery> <cfset result = getEmails.emailAddress > <cfreturn Result> </cffunction> </cfcomponent> thanks for the help |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > <cfinvoke> question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|