Data Conversions Between Coldfusion And Wsdl Data Types; Consuming Coldfusion Web Services - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Data conversions between ColdFusion and WSDL data types

A WSDL file defines the input and return parameters of an operation, including data types. For
example, the BabelFish web service contains the following definition of input and return
parameters:
<message name="BabelFishRequest">
<part name="translationmode" type="xsd:string" />
<part name="sourcedata" type="xsd:string" />
</message>
<message name="BabelFishResponse">
<part name="return" type="xsd:string" />
</message>
As part of consuming web services, you must understand how ColdFusion MX converts WSDL
defined data types to ColdFusion data types. The following table shows this conversion:
ColdFusion data type
numeric
boolean
string
array
binary
date
void (operation returns nothing)
struct
For many of the most common data types, such as string and numeric, a WSDL data type maps
directly to a ColdFusion data type. For complex WSDL data types, the mapping is not as straight
forward. In many cases, you map a complex WSDL data type to a ColdFusion structure. For
more information on handling complex data types, see
on page
728.

Consuming ColdFusion web services

Your application might consume web services created in ColdFusion. You do not have to perform
any special processing on the input parameters or return values because ColdFusion handles data
mappings automatically when consuming a ColdFusion web service.
For example, when ColdFusion publishes a web service that returns a query, or takes a query as an
input, the WSDL file for that service lists its data type as QueryBean. However, a ColdFusion
application consuming this web service can pass a ColdFusion query object to the function as an
input, or write a returned QueryBean to a ColdFusion query object.
Note: For a list of how ColdFusion data types map to WSDL data types, see
between ColdFusion and WSDL data types" on page
WSDL data type
SOAP-ENC:double
SOAP-ENC:boolean
SOAP-ENC:string
SOAP-ENC:Array
xsd:base64Binary
xsd:dateTime
complex type
"Handling complex data types"
719.
"Data conversions
Consuming web services
719

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents