tracker issue : CF-3517457

select a category, or use search below
(searches all categories and all time range)

ColdFusion mappings are ignored when using REST services

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Honey Darling / Honey Darling (honey-d)

Created: 03/11/2013

Components: REST Services

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final / 287219

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Problem Description:
I have mappings set up in ColdFusion administrator. When I expandPath() to any mapped directory during a REST call, I don't get the mapped directory. Instead, I get the path off the web root, as though the mapping does not exist.

Steps to Reproduce:
Set up a mapping in ColdFusion administrator outside of the web root.
Create a REST enabled CFC with a method that returns the result of expandPath('/mapping').
Call the REST method and examine the result.

Actual Result:
Path to a directory in the webroot.

Expected Result:
Path to a directory outside the webroot.

Any Workarounds:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3517457

Deployment Phase:	Release Candidate

External Customer Info:
External Company:  
External Customer Name: honey-d
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 7 Professional

ColdFusion 10,0,8,284032 Developer Edition




Create test.cfc ouside the webroot: <cfcomponent rest="true" restpath="/path" produces="application/json"> <cffunction name="getPath" access="remote" httpmethod="GET" returntype="string"> <cfreturn expandPath('/mapoutside') /> </cffunction> </cfcomponent> Register Rest Service with mapping named: mapoutside mapped to test.cfc create call.cfm <cfhttp url="http://localhost:8501/rest/mapoutside/path" method="get" result="x"> </cfhttp> <cfdump var="#x#"> Actual Result:Path to a directory in the webroot. Expected Result:Path to a directory outside the webroot. (Comment added from ex-user id:nawani)
Comment by Adobe D.
16054 | September 17, 2013 03:48:27 AM GMT
The Application filter were not running when invoking the webservice method. It was used when we were creating the instance of the service class. So the mappings while executing ting the function. And if the functions threw error, the onError was not called. Moved the application and other required filters while invoking the method.
Comment by Paul N.
16055 | December 05, 2013 07:09:12 AM GMT