A co-worker just found the following documentation (i'm not sure where exactly):
6. Watch Optional Arguments
If you plan to expose your CFCs as web services, be careful with optional arguments.
The Apache Axis 1.1 web services engine used by ColdFusion MX 6.1 does not support
optional input arguments. If your CFC methods contain optional arguments, the required
attribute setting is ignored, and the argument is treated as required. Here's an
example:
<cfcomponent>
<cffunction name="getMessage" access="remote" returntype="string" output="no">
<cfargument name="name" type="string" required="no" default="Stinky">
<cfreturn "Hello " & arguments.name &"! " & "I've been invoked as a web
service.">
</cffuntion>
</cfcomponent>
In this case, even though name is an optional argument as far as the CFC is concerned,
it is required when you expose it as a web service. If you try to call the component
method as a web service and don't provide a name argument, ColdFusion throws an error.
--------------------------
that sounds like either a fairly big bug to me, or something we can easily work around
with a particular coding style that we're just not using here (yet). Has anyone else
experienced this? Any insight on preferred ways to deal with it?
Thanks,
Nolan
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]