ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 28th, 2005, 05:09 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
Question <cfinvoke> question

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

Reply With Quote
  #2  
Old June 28th, 2005, 07:07 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
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

Reply With Quote
  #3  
Old June 29th, 2005, 09:08 AM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
<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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > <cfinvoke> question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT