What has returntype= got to do with argument type= ?? That's why people are having a hard time helping you: it's really not clear what you want.

Ok, take this example.

<cffunction name="sendFax" access="remote" returntype="numeric" output="false">

<cfargument name="userID" required="yes" type="numeric">
<cfargument name="faxNumber" required="yes" type="numeric">

<cfset var sendFaxReturn=....>

<cfreturn sendFaxReturn>
</cffunction>

<cfdump var="#sendFax(userID='test', faxNumber='one')#">
<cfdump var="#sendFax(userID=123, faxNumber='one')#">
<cfdump var="#sendFax(userID=1234, faxNumber='one')#">
<cfdump var="#sendFax(userID=1234, faxNumber=123)#">
<cfdump var="#sendFax(userID=1234, faxNumber=15555555555)#">


Error Code Table:

11119000: userID is not numeric
11119001: userID is not registered
11119002: faxNumber is not numeric
11119003: faxNumber is not formatted as a fax number
0: Unknown problem, please email [EMAIL PROTECTED]
1: Success

For the first dump I want it to return 11119000.
For the second dump I want it to return 11119001.
For the third dump I want it to return 11119002.
For the fourth dump I want it to return 11119003.
For the fifth dump I want it to return 1.

For any other problem return 0

Now I can test for the validity of the userID and that the faxNumber is a valid length. But I want to keep the type of the arguments both numeric in this case. The reason is that I don't want to have to write a custom documentation page for the service. I want them to be able to invoke the wsdl and see the correct type requirements.

I don't want to make them both string types because then the person doesn't know by looking in the WSDL that the type requirement is actually a numeric and not a string.

I don't know, to me this seems like such a simple request. I don't understand why it seems like it's not possible. I've seen services that do this and I want to do it also. I could have it done in a few minutes if I was able to catch the type errors from within the function.

If please still think this is a strange request, so-be-it, I just have to respectfully disagree.

Oh, another thing, I was going to record the errors also. I can do that with making the types strings and doing the checks myself in the function, but that leaves the WSDL issue open. Or I can leave them as is and not record.



----------------------------------------------------------
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]

Reply via email to