As part of publishing the component for access as a web service, ColdFusion generates the WSDL
file that defines the component where the WSDL file includes definitions for how ColdFusion
data types map to WSDL data types. The following table shows this mapping:
ColdFusion data type
numeric
boolean
string
array
binary
date
guid
uuid
void (operation returns nothing)
struct
query
any
component definition
In most cases, consumers of ColdFusion web services will be able to easily pass data to and return
results from component functions by mapping their data types to the WSDL data types shown
above.
For ColdFusion structures and queries, clients might have to perform some processing to map
their data to the correct type. For more information, see
complex data types" on page
You can also define a data type in one ColdFusion component based on another component
definition. For more information on using components to specify a data type, see
ColdFusion components to define data types for web services" on page
Producing WSDL files
ColdFusion automatically creates a WSDL file for any component referenced as a web service.
For example, if you have a component named echo.cfc in your web root directory, you can view
its corresponding WSDL file by requesting the component as follows:
http://localhost/echo.cfc?wsdl
For example, you define a ColdFusion component as follows:
<cfcomponent>
<cffunction
name = "echoString"
returnType = "string"
output = "no"
access = "remote">
<cfargument name = "input" type = "string">
<cfreturn #arguments.input#>
722
Chapter 32: Using Web Services
WSDL data type
SOAP-ENC:double
SOAP-ENC:boolean
SOAP-ENC:string
SOAP-ENC:Array
xsd:base64Binary
xsd:dateTime
SOAP-ENC:string
SOAP-ENC:string
Map
QueryBean
complex type
complex type
731.
"Publishing web services that use
724.
"Using
Need help?
Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?
Questions and answers