Most of us know that when calling a CFC either through CFINVOKE or through createObject Java call. You always have to pass in the required arguments. CF has made it easy for us to pass only what is required while ignoring the rest.

I was never big on using webservice calls till recently while moving towards more object oriented methodology. I have always been a big fan of using CFC’s to consolidate popular functions, but never found much use for webservices. Webservices now has eliminated my need to create a cfm that creates a connection to a cfc, instead you can just connect directly to your CFC via a webservice call from one remote server to another. However one drawback was that i found it to be very fineky and generic when it came to problems it may have with the CFC it is trying to connect to.

I came across 1 problem that seemed so elementary in the end but while i was trying to figure it out, it seemed very trivial. I kept receiving Web service operation getCFDSN with parameters {ACTION={search},DB_NAME={infrastructure}} cannot be found. Now i knew the function existed and that i was passing the right parameters in, yet i kept receiving the error. After much time banging my head trying to figure out why i kept receiving this error on a webservice invocation i decided to try one more thing before i ventured other options. I added all the non required arguments to the webservice call arguments i was passing to the CFC, and just gave them blank values. lo and behold my webservice call began working.

So to save someone the headache of finding this out after searching high and low. I hope this post helps someone. ColdFusion webservices does not care if an argument for a CFC is required or not. To the webservice… if an argument is defined for the CFC, it is always required.