I'm playing around with creating a couple of simple web services, but as
soon as I add more than one function to a component, I seem unable to
invoke the second function and get the error message 'Web service
operation "myDocTitle" with parameters {5024} could not be found. ' but
it works fine if I invoke the first function I created "getDocTitle".
I've tried cycling the CF service and removing the webservice from CF
admin but nothing seems to work.
What am I missing ?!!
Any help would be much appreciated (code snippets below),
Alex
For info the cfc code is:
<cfcomponent >
<cffunction name="getDocTitle" access="remote" returntype="string">
<cfargument name="DocumentID" type="numeric"
required="yes">
<cfquery name="qry_getDoc" datasource="#request.dsn#">
SELECT DocumentTitle FROM tblDocument
WHERE DocumentID = <cfqueryparam
cfsqltype="cf_sql_integer" value="#arguments.DocumentID#">
</cfquery>
<cfreturn "testing: " & qry_getDoc.DocumentTitle>
</cffunction>
<cffunction name="myDocTitle" access="remote" returntype="string">
<cfargument name="DocumentID" type="numeric"
required="yes">
<cfquery name="qry_getDoc" datasource="#request.dsn#">
SELECT DocumentTitle FROM tblDocument
WHERE DocumentID = 5024
</cfquery>
<cfreturn qry_getDoc.DocumentTitle>
</cffunction>
</cfcomponent>
And the invoking code is:
<cfscript>
DocumentID = 5024;
ws =
createobject("webservice","http://kn-dev.open.ac.uk/testarea/webservice/
document.cfc?wsdl");
testvar = ws.myDocTitle(DocumentID);
</cfscript>
<cfoutput>#testvar#</cfoutput>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]