1 Reply Latest reply on Nov 11, 2007 9:28 AM by Newsgroup_User

    Web Service Question

    Level 7
      I am hoping there is a simple fix for this. I created a web service that I
      can get to work fine with a cfinvoke:
      webservice =
      " http://realitorToolBox/model/webservices/PropertySearch.cfc?wsdl"
      method = "getCities"
      returnVariable = "listCities">

      But when I switch to a function and use createObject:
      <cffunction name="allCities" access="public" returntype="query" output="no"
      hint="I display all Cities for the home page search engine">
      <cfset CityGateway = createObject("webservice",
      " http://realitorToolBox/model/webservices/PropertySearch.cfc?wsdl")>
      <cfset allCities = CityGateway.getCities()>
      <cfreturn allCities>

      I get this error:
      Web service operation getCities with parameters {} cannot be found.

      Any ideas why?

      Here is the web function
      <cffunction name="getCities" access="remote" returntype="query"
      output="false" hint="I return all the cities in the database to search">
      <cfquery name="listCities" datasource="datasource">
      Select DISTINCT(City) FROM residential
      ORDER BY City ASC
      <cfreturn listCities>