Copy link to clipboard
Copied
I am writing a web service using ColdFusion. I would like to be able to recieve and return integers, however my only option is ColdFusion's, "numeric" type, which ends up begin a "xsd:double" in the wsdl. It also converts an integer like "3" to "3.0".
I am using cfc's with <cfproperty's in them to define my complex types.
Is there any way to get more specific with the types in the wsdl created by a ColdFusion web service?
Copy link to clipboard
Copied
The problem is that CF by default maps type="numeric" in a CFC to a double as you've already figured out. There's nothing you can do about that fact afaik, you could try to produce your own wsdl file and bind it against your web service CFC by using the wsdlFile attribute.
Another path to investigate is using the java layer below CF, it offers tools like wsdl2java etc. Have a read of some of Tom Jordahl's blog posts, he pretty much built the web services engine into CF and he's involved with the Apache Axis project:
http://tjordahl.blogspot.com/2008/07/special-axis-types-and-coldfusion.html
http://tjordahl.blogspot.com/2008/07/for-some-reason-i-havent-actually-even.html
and more...
Cheers
Kai