User Guide

Table Of Contents
Handling complex data types 913
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 very 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:
The WSDL file for a QueryBean defines these elements as follows:
<complexType name="ArrayOf_SOAP-ENC_Array">
<complexContent>
<restriction base="SOAP-ENC:Array">
Element name Description
ColumnList String array that contains column names
data Two-dimensional array that contains query data