I am creating a Web Service in Coldfusion MX 7 and I am
looking for help on its design.
The problem is, one of the cffunction's called
"calculateQuote" requires over 30 <cfargument...> statements
to get all of the necessary input. To make matters worse, 10 of
these arguments describe insurance policies as part of the quote
and each policy can occur from 1 to many times. I am envisioning a
<cffunction...> statement that is enormous.
As an alternative, is it reasonable to have 1
<cfargument...> statement that contains an xml document that
has all of the input? Would this be a strange thing to do or is it
a "normal" way to write web services that require a lot of input
Here is what I would assume the cffunction would look like...
<cffunction access="remote" name="calculateQuote"
<cfargument name="xmlQuoteInput" type="???"
<cfset strucValidate =
Validate the XML --->
<cfset varXMLQuoteInput =
... and so on
Can't do one arg with xml type if using a CFC as a web
service, it won't create the WSDL correctly if you want ColdFusion
to do it automatically and any consumer will not know what to pass
into it unless you publish documentation saying exactly what you