Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

coldfusion REST service, 404 not found

$
0
0

 

I cannot seem to get my REST service to work... I get a 404 when I call the URL.

Im running Win 7, CF 10 developer, Apache webserver. I've developed on this for years, so the setup works - but this is my first go at REST services thru CF...

I mention that because CF is working, the dir and webserver are working etc.

 

Directory looks like this

C:\wwwroot\restTest

 

CODE - saved as "obj1.cfc" - ( Note: I've tried restpath with and without the / )

<cfcomponentrestpath="/restTest"rest="true">  
    <cffunctionname="getMethod"access="remote"returntype="String"httpmethod="GET"> 
        <cfreturn"this is a string returned"/> 
    </cffunction> 
</cfcomponent>

The coldfusion ADMIN setup looks like this

Root path:'C:\wwwroot\restTest'ServiceMapping:'test'

I'm using the service mapping because I don't have an associated application name - no Application.cfc - I was trying to keep this super simple.

I get a green 'success' message when I set that path

Browse to -

127.0.0.1/rest/test/restTest

result - 404

 

What am I doing wrong? It is my understanding that "/rest/" is a default mapped path in CF for routing the service - I may be wrong, but I know I read it somewhere - and the examples all use it.

I also believe I can change that either in the admin or in some XML file...

 

Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>