<slide title="Data Type Maps">

<blurb>To include Schema for complex data types, you must
define the data type map in your classes.
</blurb>

<list title="Data Type Map">
<bullet>The key is the data type name and namespace</bullet>
<bullet>The value is a *structure* that will be mapped into schema.  This can
be an arbitrarily complex set of array's to define the data object.</bullet>
</list>
<example title="Dispatch Map Example" type="php" fontsize='1.4em'>
<![CDATA[<?php 
$this->__typedef['{http://soapinterop.org/xsd}SOAPStruct'] = 
            array(
                'varString' => 'string',
                'varInt' => 'int', 
                'varFloat' => 'float'
                );

$this->__typedef['{http://soapinterop.org/xsd}SOAPStructArray'] = 
            array(
                array(
                    'item'=>'{http://soapinterop.org/xsd}SOAPStruct'
                )
            );
?>]]>
</example>

<example title="Schema Generated" type="xml" fontsize='1.4em'>
<![CDATA[<schema 
    xmlns="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://soapinterop.org/xsd">
    
    <complexType name="SOAPStruct">
        <all>
            <element name="varString" type="xsd:string" />
            <element name="varInt" type="xsd:int" />
            <element name="varFloat" type="xsd:float" />
        </all>
    </complexType>

    <complexType name="SOAPStructArray">
        <complexContent>
            <restriction base="SOAP-ENC:Array">
                <attribute 
                    ref="SOAP-ENC:arrayType" 
                    wsdl:arrayType="ns5:SOAPStruct[]" />
            </restriction>
        </complexContent>
    </complexType>
</schema>]]>
</example>

</slide>