ehart12
asked on
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)#</numb er>
</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={m sl}} cannot be found.
Please advise,
Eric
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.
</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={m
Please advise,
Eric
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.