indicates that you called 'update'.
Second, web service calls are always static. When the call is made, a
new instance of the CFC is instantiated, the method is invoked, and
then the instance goes to garbage collection. If you need to maintain
state across multiple method calls, then you have to use a facade CFC.
The web services client invokes a method on the facade CFC which, in
turn, invokes methods on a stateful component, usually in the session
or application scope. It sounds like what you've got right now is the
stateful component, exactly as it needs to be, except that you can
switch the access from 'remote' to 'public'.
For example, you need to call init, a couple setters, and then create
on your CFC. What you need to do is, make a new facade CFC skeleton
that has the same method names as your current CFC, all with
access="remote". In the facade's 'init' method, instantate your
stateful CFC into the session scope and call 'init' on it. In the
facade's other methods, just invoke the corresponding method on the
session-scoped CFC instance.
Let me know if that makes sense, or if you've got any other questions.
cheers,
barneyb
On Fri, 30 Jul 2004 21:40:41 -0400, Cutter (CF-Talk)
<[EMAIL PROTECTED]> wrote:
> OK, I finally have my init() method working, as well as learning some of
> the bugs (like the cfargument required=...now that's annoying). Here's a
> new one. I have a create method to write to the db. In the DWMX
> WebServices panel I can see the method (this applies to my update method
> as well). But when I call the method [aCat.create()] I get the following
> error on the page:
>
> Error Occurred While Processing Request
> The selected method update was not found.
> Either there are no methods with the specified method name and argument
> types, or the method update is overloaded with arguments types that
> ColdFusion can't decipher reliably. If this is a Java object and you
> verified that the method exists, you may need to use the javacast
> function to reduce ambiguity.
>
> Here is the code of the method:
>
> <cffunction name="create" access="remote" returntype="void"
> hint="Requires that you have already called the setCategoryName() and
> setStatus() methods of this object">
>
> <cftransaction>
> <cfquery name="qCat" datasource="#application.config.DSN#">
> insert into tblboutcat2 (
> txtBoutCat,
> blActive )
> values (
> <cfqueryparam cfsqltype="cf_sql_varchar"
> value="#this.categoryName#" null="#YesNoFormat(NOT
> Len(Trim(this.categoryName)))#">,
> <cfqueryparam cfsqltype="cf_sql_tinyint" value="#this.status#"
> null="#YesNoFormat(NOT Len(Trim(this.status)))#"> )
> </cfquery>
>
> <cfquery name="qID" datasource="#application.config.DSN#">
> select max(intBoutCatID) as ID
> from tblboutcat2
> </cfquery>
>
> <cfset this.ID = qID.ID>
> </cftransaction>
> </cffunction>
>
> And here's the lines of the wsdl document that make me wonder:
>
> - <wsdl:operation name="create">
> <wsdl:input name="createRequest" message="impl:createRequest" />
> <wsdl:output name="createResponse" message="impl:createResponse" />
> <wsdl:fault name="CFCInvocationException"
> message="impl:CFCInvocationException" />
> </wsdl:operation>
>
> Once again, any suggestions are appreciated.
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

