Reputation: 11
I need to move a web service from an old ColdFusion 8 server (running from SQL 2005) to a new ColdFusion 2016 (running from SQL 2016).
The web service is just a basic .CFC file which is coded like this:
<cfcomponent output="false">
<cffunction name="getinfo"
returntype="query"
output="no"
access="remote">
<cfargument name="variable1" type="string">
<cfargument name="variable2" type="string">
<cfargument name="variable3" type="string">
<cfquery name="qryName" datasource="database_name">
select columns from table
</cfquery>
<cfreturn qryName>
</cffunction>
</cfcomponent>
My vendor using the web service is receiving this error:
Unable to generate a temporary class (result=1).
error CS0266: Cannot implicitly convert type 'object' to 'object[]'
The issue appears to be that ColdFusion 8 service was showing:
data() As Object()
But the new ColdFusion 2016 is showing:
data() As Object()()
I don't have a clue as to where ColdFusion is even setting the Object as I thought everything was contained within the .CFC file. I'm not very advanced with ColdFusion, so any help is appreciated.
Any idea why the extra () is showing up on the Object()? How would I go about investigating this?
Note: The ColdFusion 8 server had a fully in-house coded website on it with an Application.cfm file, etc. which I did not copy to the ColdFusion 2016 server. If I need to look at the old setup, which files should I be looking for?
Upvotes: 1
Views: 61
Reputation: 28873
(From the comments)
Just a guess, but might be related to the switch to Axis2 in CF10+. New web services now default to wsversion=2
. That often causes problems when migrating older code which expect the old Axis1 behavior. Try switching the web service back to wsversion=1
in the CF Administrator and see if that fixes the problem.
See Using Axis2 web services with ColdFusion 10 for other ways to set the version at the application and component levels.
Upvotes: 1