我正在 ColdFusion 8 中使用带有远程方法的 CFC 构建 Web 服务。我需要在 WSDL 中指定复杂的数据类型,因此我为每种类型创建 CFC。例如,假设我有一个“Person”类型。它包括“年龄”属性。该属性必须始终是整数。但是,ColdFusion 没有“整数”作为有效类型 - 只有数字,它在 WSDL 中转换为“xsd:double”。如何指定属性(或参数)具有“整数”类型?
仅供参考,亨利的回答非常有帮助,但我试图从函数返回一个对象 - 而不仅仅是一个整数。我需要将其中一个属性作为整数返回。
I'm building a WebService in ColdFusion 8 using CFCs with remote methods. I need to specify complex data types in the WSDL, so I'm creating CFCs for each of these types. For instance, let's say I have a "Person" type. It includes an "age" property. This property needs to always be an integer. However, ColdFusion does not have "integer" as a valid type - only Numeric, which translates to "xsd:double" in the WSDL. How can specify that a property - or an argument, for that matter - has a type of "integer"?
FYI, Henry's answer is very helpful, but I'm trying to return an Object from the function - not just an integer. I need one of the properties to be returned as an integer.
发布评论
评论(1)
http://www. Threesources.com/archives/009007.html
http://www.threesources.com/archives/009007.html