> -----Original Message----- > From: Rick Root [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 17, 2005 12:44 PM > To: CF-Talk > Subject: Re: REPOST: webservices and optional numeric arguments > > Bryan Stevenson wrote: > > > >>I think that you have to allow the cfargument to be of type string or > >>type any, and then do additional checks to determine if it is numeric > >>or blank (ie null) within your code. > > > > > > Which is what I'm trying to find a way around as that approach sucks > IMHO > > It's the only way. > > Deal with it =)
He's right... it sucks, but it's our lot. There are a LOT of seeming stupidities in the WSDL and XSD formats... a LOT. ;^) Personally I generally define a default "non-value-value". For most numbers zero works or zero and -1 in conjunction. It depends on what the number is. For example if the field is "number of children" you can pass zero if there are no children or "-1" if the question wasn't answered. I think most "optional" numbers could fall into that scheme. If not, has others have suggested, you just accept type "any" and a blank string indicates the client opted not to send it. Rick's right in that, for most all cases, you'll have to do some further validation of the argument anyway - and it's just as much an error if you throw it itself. Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215441 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

