• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Web Service Question

LEGEND ,
Nov 11, 2007 Nov 11, 2007

Copy link to clipboard

Copied

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:
<cfinvoke
webservice =
" http://realitorToolBox/model/webservices/PropertySearch.cfc?wsdl"
method = "getCities"
refreshwsdl="true"
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>
</cffunction>

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
</cfquery>
<cfreturn listCities>
</cffunction>


TOPICS
Advanced techniques

Views

214

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 11, 2007 Nov 11, 2007

Copy link to clipboard

Copied

LATEST
Nevermind. I added the createObject to the controller and it worked fine
instead of pointing it to another function.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation