Consuming web services
719
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:
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
“Handling complex data types”
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
“Data conversions
between ColdFusion and WSDL data types” on page 719
.
ColdFusion data type
WSDL data type
numeric
SOAP-ENC:double
boolean
SOAP-ENC:boolean
string
SOAP-ENC:string
array
SOAP-ENC:Array
binary
xsd:base64Binary
date
xsd:dateTime
void (operation returns nothing)
struct
complex type
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...