<error>
<errorCode>1</errorCode>
<errorMessage>You have supplied an invalid id number</errorMessage>
</error>If I had a service like below you can't return an error like that because if you invoke this with a customerIDNumber that is a string and not numeric the error is displayed to screen and not caught in the method.
<cffunction name="validateCustomerInfo" access="remote" returntype="string" output="false">
<cfargument name="customerIDNumber" required="yes" type="numeric">
<cfset var validateCustomerInfoReturn=generateError('string', 'none')><cfif checkCustomerID(arguments.customerIDNumber)>
<cfset validateCustomerInfoReturn=....>
<cfelse>
<cfset validateCustomerInfoReturn=generateError('string', arguments.customerIDNumber)>
</cfif>
<cfreturn validateCustomerInfoReturn> </cffunction>
David Ross wrote:
----------------------------------------------------------I may be missing something, but isn't the idea behind webservices that it is up to the consumer to supply the right arguments and handle any errors that occur from not doing so?
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]
