Chad what if your loop looked like:
<cfloop index="i" from="1" to="4" >
<cfoutput>
#aServerCatalogList.getServerCatalog(javacast("int",i).getName())#<br />
</cfoutput>
</cfloop>
'i' might be treated as a string there instead of a number,
Phil
-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Friday, March 16, 2007 10:20 AM
To: CF-Talk
Subject: RE: webservice newbie question
Hmmmm thought I would get fancy and loop over it and output 4 catalog
names and I get this error:
The selected method getServerCatalog was not found.
Either there are no methods with the specified method name and argument
types, or the method getServerCatalog is overloaded with arguments types
that ColdFusion can't decipher reliably. If this is a Java object and
you verified that the method exists, you may need to use the javacast
function to reduce ambiguity.
I tried javaCast and get the same error.
<cfloop index="i" from="1" to="4" >
<cfoutput>
#javacast("string",
aServerCatalogList.getServerCatalog(i).getName())#<br />
</cfoutput>
</cfloop>
If I manually number them then I am fine.
#javacast("string",
aServerCatalogList.getServerCatalog(1).getName())#<br />
#javacast("string",
aServerCatalogList.getServerCatalog(2).getName())#<br />
#javacast("string",
aServerCatalogList.getServerCatalog(3).getName())#<br />
#javacast("string",
aServerCatalogList.getServerCatalog(4).getName())#<br />
-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Friday, March 16, 2007 9:56 AM
To: CF-Talk
Subject: RE: webservice newbie question
Ah.. now I am starting to see where this goes.
I drop a number into it
<cfdump var="#aServerCatalogList.getServerCatalog(2)#">
Now I get another object
object of com.canto.www._2005.cumulus.ws.types.ServerCatalog
Methods hashCode (returns int)
equals (returns boolean)
getName (returns java.lang.String)
setName (returns void)
getId (returns int)
setId (returns void)
getSerializer (returns interface org.apache.axis.encoding.Serializer)
getDeserializer (returns interface
org.apache.axis.encoding.Deserializer)
getTypeDesc (returns org.apache.axis.description.TypeDesc)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
Now I do
<cfdump var="#aServerCatalogList.getServerCatalog(2).getName()#">
And I get the name of the catalog.
-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: Friday, March 16, 2007 9:46 AM
To: CF-Talk
Subject: RE: webservice newbie question
Thanks Phil, I did the dump and it returned an array.
<cfdump var="#aServerCatalogList.getServerCatalog()#">
I do have the API so I will read some more.
array
1 object of com.canto.www._2005.cumulus.ws.types.ServerCatalog
Methods hashCode (returns int)
equals (returns boolean)
getName (returns java.lang.String)
setName (returns void)
getId (returns int)
setId (returns void)
getSerializer (returns interface org.apache.axis.encoding.Serializer)
getDeserializer (returns interface
org.apache.axis.encoding.Deserializer)
getTypeDesc (returns org.apache.axis.description.TypeDesc)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
2 object of com.canto.www._2005.cumulus.ws.types.ServerCatalog
Methods hashCode (returns int)
equals (returns boolean)
getName (returns java.lang.String)
setName (returns void)
getId (returns int)
setId (returns void)
getSerializer (returns interface org.apache.axis.encoding.Serializer)
getDeserializer (returns interface
org.apache.axis.encoding.Deserializer)
getTypeDesc (returns org.apache.axis.description.TypeDesc)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
notify (returns void)
notifyAll (returns void)
toString (returns java.lang.String)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7.
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:272852
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4