This content has been marked as final. Show 5 replies
Ok, I will make this simplier. Couple questions.
Is it possible to use cfargument in a web service?
I looked at the samples out there and they all just have queries that take a
form variable (#form.name#) since it was being passed by a form.
Is it possible to have one web service function invoke another function in
the same cfc?
If you have one function that calls another to first validate the user and
then invoke another to get the search results, do all have to be remote or
can you have the search be private since you dont want it invoked remotely.
<cffunction name="search" access="remote" returntype="query">
<cfset authenticate = authenticateUser(#username#)>
<cfif authenticate EQ 'yes'>
<cfset myResults = searchProperty(#mlsnumber#)>
<cfreturn my Results>
I tried a simple city search and tried to pass a variable argument.
webservice=" http://184.108.40.206/realitorToolBox/model/webservices/CityGateway.cfc?wsdl" method="findCity" city = "clinton" returnvariable="aQuery"/>to: <cffunction name="findCity" access="remote" returntype="query"> <cfquery name="getCities" datasource="MLSListings"> Select city FROM residential WHERE city = '#city#' </cfquery> <cfreturn getCities> </cffunction>And I still get a function cannot be found, even though I used the cfcexplorer to verify that it does exist on the remote server.Any ideas?
you have access set to public instead of remote in the function definition.
That is the controller and not the web service.
Your problem is this:
Examples of valid argument types are date, string, number, etc.
You have other issues also, but that's the one that's causing your current problem.
Actually, that is how you set a controller with Model-Glue. That part is
fine. Check into model-glue and you'll see that the event is a collection of
all the variables from form or url.