Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1124

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Publishing web services that use complex data types
The two ColdFusion data types that do not map exactly to WSDL data types are struct and query. When you publish
a ColdFusion web service that uses parameters of type struct or query, the consuming application must be able to
handle the data.
Note: If the consumer of a ColdFusion web service is another ColdFusion application, you do not have to perform any
special processing. ColdFusion correctly maps struct and query data types in the web service publisher with the consumer.
For more information, see
"Consuming ColdFusion web
Publishing structures
A ColdFusion structure can hold an unlimited number of key-value pairs where the values can be of any ColdFusion
data type. While it is a useful and powerful way to represent data, it cannot be directly mapped to any XML data types
defined in the SOAP 1.1 encoding and XML Schema specification. Therefore, ColdFusion structures are treated as a
custom type and the complex type XML schema in WSDL looks like the following:
<complexType name="mapItem">
<sequence>
<element name="key" nillable="true" type="xsd:anyType"/>
<element name="value" nillable="true" type="xsd:anyType"/>
</sequence>
</complexType>
<complexType name="Map">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/>
</sequence>
</complexType>
This complex type defines a representation of a structure, where the structure keys and values can be any type.
In the WSDL mapping of a ColdFusion structure, each key-value pair in the structure points to the next element in the
structure except for the final field, which contains a value. Use dot notation to access the key-value pairs.
Publishing queries
ColdFusion publishes query data types as the WSDL type QueryBean. The QueryBean data type contains two
elements, as the following excerpt from a WSDL file shows:
<complexType name="QueryBean">
<all>
<element name="data" nillable="true" type="intf:ArrayOf_SOAP-ENC_Array" />
<element name="ColumnList" nillable="true"
type="intf:ArrayOf_SOAP-ENC_string" />
</all>
</complexType>
The following table describes the elements of QueryBean:
Element name
ColumnList
data
The WSDL file for a QueryBean defines these elements as follows:
services" on page 1103.
Description
String array that contains column names
Two-dimensional array that contains query data
Last updated 1/20/2012
1119

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents