?
Solved

ColdFusion Web Service Issue

Posted on 2011-05-12
1
Medium Priority
?
265 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:ehart12
1 Comment
 

Accepted Solution

by:
ehart12 earned 0 total points
ID: 35747121
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question