At 12:21 PM 6/3/2004, you wrote: What about this:
1) Create a series of UDFs that validate the various datatypes (IsNumeric(), IsStruct(), etc.) and wrap them in a CFC. 2) Have your webservice CFC extend this CFC to have access to the methods. (You could optionally pass an instance of the validator CFC to each webservice CFC and store it in VARIABLES). 3) Set the type="" attribute for all arguments to "ANY" and add your own "custom_type" attribute with what the type _should_ be 4) Write a function that uses GetMetaData() to return your custom_type attribute value and pass this along with the supplied value to the validator CFC. 5) Include this one function call at the top of all of your webservice methods, wrapped in TRY/CATCH blocks. 6) If the arguments match, you move on, if not, you throw your custom error. Hope this helps! >Ok, thanks, that sucks though. I don't want to check every argument manually and I >can't do it outside the method. > >I'm doing this for webservices that have a lot of arguments of varying types that I >need to return an error in the correct data type for the function so that the error >can be returned to the user of the webservice and not printed to screen. > >Raymond Camden wrote: > >>You can't handle it _inside_ the method unless you don't use the type value >>of cfargument and do the checking yourself. You can certainly catch it when >>you call the method _outside_ the method call. >---------------------------------------------------------- >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] ---------------------------------- Alex Sherwood PHS Collection Agency THE COLLECTORS P: 813-283-4579 F: 301.664.6834 W: www.phs-net.com ---------------------------------------------------------- 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]