0 Replies Latest reply on Mar 14, 2008 7:52 AM by Trevor B.

    Complex Data Types - Webservices

    Trevor B.
      Wondering if anyone has come up with a way to catch invalid data type errors when the data type is a component?

      For example:

      <cffunction name="aService" access="remote" returntype="aResponse" output="no">
      <cfargument name="aObject" type="ObjectData">

      <cfproperty name="Var1" type="numeric" default="">
      <cfproperty name="Var2" type="boolean" default="">
      <cfproperty name="Var3" type="date" default="">

      In the above example if you pass a string value to Var1, the service bombs and does not end gracefully (as it would if you had "regular" arguments defined in WebService.cfc with invalid data) It would be nice to be able to trap for data type mismatches in this senerio and return a error to the calling program. As it stands now I've had to set all my data types to "string" and write the validations myself.