That can't be done, and I think that sucks. I can't do anything about it so I'm just going to generate my own WSDL from a function.
Well, you can auto-generate the WSDL from a CFC - you just need a different CFC interface to the actual code you need to implement behind the scenes. I think that will be less work for you that trying to create the WSDL by hand...
What I don't understand is if I can write CF to generate a correct WSDL for a function fairly easy. Why couldn't CF do it automatically?
I don't understand you - CF does generate a correct WSDL for the CFC code. It does exactly the right thing. Any system that auto-generates WSDL from code will behave the same way. What you really want is code that is generic and accepts any arguments and does its own validation but WSDL that reflects some arbitrarily stricter code interface.
In some ways, what you really need is an enhancement to CFCs that would allow this:
<cffunction name="sendFax" returntype="numeric" access="remote" output="false">
<cfargument name="userID" type="any" required="false"
wsdltype="numeric" wsdlrequired="true" />
<cfargument name="faxNumber" type="any" required="false"
wsdltype="numeric" wsdlrequired="true" />
<cfset var status = 0 />
...
<cfreturn status />
</cffunction>
Here the WSDL is generated based on the wsdltype= and wsdlrequired= attributes which override the standard attributes. That would allow you to perform all the validation inside the function.
If y'all think that's a nice enhancement and is worth adding, submit it to:
http://www.macromedia.com/go/wish
Sean A Corfield -- http://www.corfield.org/blog/
"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man."
-- George Bernard Shaw
----------------------------------------------------------
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]
