Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)
Created: 11/30/2012
Components: REST Services
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final / 287369
Priority/Frequency: Normal / Few users will encounter
Locale/System: English / Windows 7 64-bit
Vote Count: 0
Given this CFC:
<cfcomponent rest="true" restPath="timeService">
<cffunction name="sayHello" access="remote" httpMethod="get">
<cfreturn dateTimeFormat(now())>
</cffunction>
</cfcomponent>
I was not able to call it via REST. When I did, I got a service not found error. Turns out the issue was a missing returnType. As soon as I added that...
<cfcomponent rest="true" restPath="timeService">
<cffunction name="sayHello" access="remote" httpMethod="get" returnType="string">
<cfreturn dateTimeFormat(now())>
</cffunction>
</cfcomponent>
it worked. CF should have thrown an error here instead of a service not found result. I'll certainly take the blame for forgetting a returnType, but if it is required, then it should be required. Note that the docs only say access="remote" is required, it does not mention returnType being required (as far as I can see).
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3375263
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: cfjedimaster
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: