Let them deal with it.  I suspect that CF will automatically convert
string arguments to numeric, just like it does internally, but I don't
know for sure.  Either way, it's up to the WS client to make sure
they're calling the service in the right way.  The error message
should come from the type-checker on their end, not from your server,
at least if they're using a strongly typed language.  If not, then
they'll get a type error from CF, and it should be equally
communicative of what went wrong.

cheers,
barneyb

On 8/11/05, Bryan Stevenson <[EMAIL PROTECTED]> wrote:
> I know...another "best practices" thread ;-)
> 
> I'm wondering how others out there are handling argument types for web 
> services?
> 
> Typically if an argument is meant to be numeric you would code it as such.  
> Now if someone calling the webservice were to pass in a string instead of a 
> number and error would be thrown.
> 
> I'm guessing depending on the langauge consuming the web service the error 
> they get will differ??
> 
> Will that error likley tell them they passed an invalid typed argument? or 
> would it be tough to determine what went wrong?
> 
> Would it be better/worse to simply make that argument accept a string and 
> then in the method make sure it's a number and if not return a meaningful 
> error message (so no real error occurs)?  or is it better to leave it up to 
> the web service consumers to try/catch errors in their own dang app and read 
> the web service specs to know what kind of arguments are to be passed? ;-)
> 
> thoughts??
> 
> TIA
> 
> Cheers
> 
-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214607
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to