ColdFusion Web Service Issue

Hi Experts,

I am trying to develop a ColdFusion Web Service and having an issue defining more than one <cfinvokeargument>.

Here is my CFM:

<body>
<cfinvoke method="listRecords"
   returnvariable="rawXMLList"
   webservice="http://dev.../web_services/test.cfc?wsdl">

   <cfinvokeargument name="project" value="msl"/>
   <cfinvokeargument name="status" value="open"/>

</cfinvoke>

<cfset Records = XmlParse(rawXMLList)>
<cfdump var="#Records#">
</body>


Here is my CFC:

<cfcomponent>
  <cffunction name="listRecords"
    access="remote"
    returntype="string"
    output="no">

<cfargument name="project" type="string" required="yes"/>
<cfargument name="status" type="string" required="yes"/>

<cfset var Records = "">
<cfset var getall = "">

<cfquery name="getall" datasource="dsn">
select * from table
where upper(character4) = '#ucase(project)#'
and upper(character37) = '#ucase(status)#'
</cfquery>

<cfsavecontent variable="Records">
<data_set>
<cfoutput query="getall">
  <record>
    <number>#XMLFormat(getall.id)#</number>
  </record>
</cfoutput>
</data_set>
</cfsavecontent>

<cfreturn Records>
</cffunction>
</cfcomponent>


When I run this, I am getting the following error: Web service operation listRecords with parameters {status={open},category={msl}} cannot be found.

Please advise,

Eric
ehart12Asked:
Who is Participating?
 
ehart12Connect With a Mentor Author Commented:
Hi All,

I will award myself the points ;)

This issue has been resolved by simply adding refreshWSDL="yes" to the cfinvoke tag.

Example:

<cfinvoke
   webservice="http://dev.../web_services/test.cfc?wsdl"
   method="listRecords"
   returnvariable="rawXMLaidsList"
   refreshWSDL="yes">

Thank you,

Eric


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.