Coldfusion REST service not found error -


i have problem calling rest servise. returns not found error always.

rest service registered in cf administrator:

  • root path: d:\projects\testcf11\restfolder
  • host: testcf11.localhost
  • service mapping: testrest

in /restfolder 1 cf component:

<cfcomponent rest="true" restpath="customers"> <cffunction name="getcustomer" restpath="{customerid}" access="remote" returntype="string" httpmethod="get">     <cfargument name="customerid" required="true" restargsource="path" type="numeric">     <cfset ret = "customer id: " & arguments.customerid>     <cfreturn ret> </cffunction> </cfcomponent> 

i try code:

<cfhttp url="http://testcf11.localhost/rest/testrest/customers/1" method="get"> </cfhttp> <cfdump var="#cfhttp#" /> 

softwer: windows 8.1, apache 2.4, cf 11 developer edition

thanks idea

edit1:

i have entry in hosts file.

127.0.0.1 testcf11.localhost 

it seems problem associated hostname. have made entry in hosts file testcf11.localhost? try adding , may solve problem. hosts file located inside %windir%\system32\drivers\etc. edit file , make entry similar this.

127.0.0.1    testcf11.localhost 

after making entry may need restart system. checked on system , works.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -