<commit_before><sect1 id="zend.soap.wsdl">
    <title>WSDL Accessor</title>
    
    <note>
        <para>
            <code>Zend_Soap_Wsdl</code> class is used by Zend_Soap_Server component internally to operate with WSDL
            documents. Nevertheless, you could also use functionality provided by this class for your own needs. 
        </para>
        <para>
            If you don't plan to do this, you can skip this documentation section.
        </para>
    </note>
    
    <sect2 id="zend.soap.wsdl.constructor">
        <title><code>Zend_Soap_Wsdl</code> constructor.</title>
        <para>
            <code>Zend_Soap_Wsdl</code> constructor takes three parameters:
            <orderedlist>
                <listitem>
                    <simpara><code>$name</code> - name of the Web Service being described.</simpara>
                </listitem>
                <listitem>
                    <simpara>
                        <code>$uri</code> - URI where the WSDL will be available 
                        (could also be a reference to the file in the filesystem.)
                    </simpara>
                </listitem>
                <listitem>
                    <simpara>
                        <code>$extractComplexTypes</code> - optional flag used to identify that complex types (objects)
                        should be extracted.
                    </simpara>
                </listitem>
            </orderedlist>
        </para>
    </sect2>
    
    
    <sect2 id="zend.soap.wsdl.addmessage">
        <title><code>addMessage()</code> method.</title>
        <para>
            <code>addMessage($name, $parts)</code> method adds new message description to the WSDL document 
            (/definitions/message element).
        </para>
        <para>
            Each message correspond to methods in terms of <code>Zend_Soap_Server</code> and 
            <code>Zend_Soap_Client</code> functionality.
        </para>
        <para>
           <code>$name</code> parameter represents message name.
        </para>
        <para>
           <code>$parts</code> parameter is an array of message parts which describe SOAP call parameters.
           It's an associative array: 'part name' (SOAP call parameter name) =&gt; 'part type'.
        </para>
        <para>
            Type mapping management is performrd using <code>addTypes()</code>, <code>addTypes()</code> and
            <code>addComplexType()</code> methods (see below). 
        </para>
        <note>
            <para>
                Messages parts can use either 'element' or 'type' attribute for typing 
                (see <ulink url="http://www.w3.org/TR/wsdl#_messages"/>).
            </para>
            <para>
                'element' attribute must refer to a corresponding element of data type definition. 'type' attribute refers 
                to a corresponding complexType entry.
            </para>
            <para>
                All standard XSD types have both 'element' and 'complexType' definitions 
                (see <ulink url="http://schemas.xmlsoap.org/soap/encoding/"/>).
            </para>
            <para>
                All non-standard types, which may be added using <code>Zend_Soap_Wsdl::addComplexType()</code> method, are
                described using 'complexType' node of '/definitions/types/schema/' section of WSDL document.
            </para>
            <para>
                So <code>addMessage()</code> method always uses 'type' attribute to describe types.
            </para>
        </note>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_port_type">
        <title><code>addPortType()</code> method.</title>
        <para>
            <code>addPortType($name)</code> method adds new port type to the WSDL document 
            (/definitions/portType) with the specified port type name.
        </para>
        <para>
            It joins a set of Web Service methods defined in terms of Zend_Soap_Server implementation.
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_porttypes"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_port_operation">
        <title><code>addPortOperation()</code> method.</title>
        <para>
            <code>addPortOperation($portType, $name, $input = false, $output = false, $fault = false)</code> method 
            adds new port operation to the specified port type of the WSDL document 
            (/definitions/portType/operation).
        </para>
        <para>
            Each port operation corresponds to a class method (if Web Service is based on a class) or function
            (if Web Service is based on a set of methods) in terms of Zend_Soap_Server implementation.
        </para>
        <para>
            It also adds corresponding port operation messages depending on specified 
            <code>$input</code>, <code>$output</code> and <code>$fault</code> parameters.
            
            <note>
                <para>
                    Zend_Soap_Server component generates two messages for each port operation while describing service based on
                    <code>Zend_Soap_Server</code> class:
                    <itemizedlist>
                        <listitem>
                            <para>
                                input message with name <code>$methodName . 'Request'</code>.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                output message with name <code>$methodName . 'Response'</code>.
                            </para>
                        </listitem>
                    </itemizedlist>
                </para>
            </note>
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_request-response"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_binding">
        <title><code>addBinding()</code> method.</title>
        <para>
            <code>addBinding($name, $portType)</code> method adds new binding to the WSDL document (/definitions/binding). 
        </para>
        <para>
            'binding' WSDL document node defines message format and protocol details for operations and messages 
            defined by a particular portType (see <ulink url="http://www.w3.org/TR/wsdl#_bindings"/>).
        </para>
        <para>
            The method creates binding node and returns it. Then it may be used to fill with actual data.
        </para>
        
        <para>
            Zend_Soap_Server implementation uses <code>$serviceName . 'Binding'</code> name for 'binding' element of WSDL document.
        </para>
    </sect2>
    
    
    <sect2 id="zend.soap.wsdl.add_binding_operation">
        <title><code>addBindingOperation()</code> method.</title>
        <para>
            <code>addBindingOperation($binding, $name, $input = false, $output = false, $fault = false)</code> method adds 
            an operation to a binding element (/definitions/binding/operation) with the specified name.
        </para>
        <para>
            It takes <code>XML_Tree_Node</code> object returned by <code>addBinding()</code> as an input 
            (<code>$binding</code> parameter) to add 'operation' element with input/output/false entries depending on
            specified parameters    
        </para>
        <para>
            Zend_Soap_Server implementation adds corresponding binding entry for each Web Service method with input and output 
            entries defining 'soap:body' element as 
            '&lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_bindings"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_soap_binding">
        <title><code>addSoapBinding()</code> method.</title>
        <para>
            <code>addSoapBinding($binding, $style = 'document', $transport = 'http://schemas.xmlsoap.org/soap/http')</code> 
            method adds SOAP binding ('soap:binding') entry to the binding element (which is already linked to some port type) 
            with the specified style and transport (Zend_Soap_Server implementation uses RPC style over HTTP).
        </para>
        <para>
            '/definitions/binding/soap:binding' element is used to signify that the binding is bound to the SOAP protocol format. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_bindings"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_soap_operation">
        <title><code>addSoapOperation()</code> method.</title>
        <para>
            <code>addSoapOperation($binding, $soap_action)</code> 
            method adds SOAP operation ('soap:operation') entry to the binding element with the specified action. 
            'style' attribute of the 'soap:operation' element is not used since programming model (RPC-oriented or document-oriented)
            may be st using <code>addSoapBinding()</code> method 
        </para>
        <para>
            'soapAction' attribute of '/definitions/binding/soap:operation' element specifies the value of the SOAPAction header 
            for this operation. This attribute is required for SOAP over HTTP and <emphasis>must not</emphasis> be
            specified for other transports. 
        </para>
        <para>
            Zend_Soap_Server implementation uses <code>$serviceUri . '#' . $methodName</code> for SOAP operation action name. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_soap:operation"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_service">
        <title><code>addService()</code> method.</title>
        <para>
            <code>addService($name, $port_name, $binding, $location)</code> method adds '/definitions/service' element to 
            the WSDL document with the specified Wed Service name, port name, binding, and location.
        </para>
        <para>
            WSDL 1.1 allows to have several port types (sets of operations) per service. This ability is not used by 
            Zend_Soap_Server implementation and not supported by <code>Zend_Soap_Wsdl</code> class.   
        </para>
        <para>
            Zend_Soap_Server implementation uses:
            <itemizedlist>
                <listitem>
                    <para>
                        <code>$name . 'Service'</code> as a Web Service name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        <code>$name . 'Port'</code> as a port type name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        <code>'tns:' . $name . 'Binding'</code>
                            <footnote>
                                <para>
                                    <code>'tns:' namespace</code> is defined as script URI 
                                    (<code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>).
                                </para>
                            </footnote> 
                            as binding name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        script URI<footnote><para><code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code></para></footnote>
                        as a service URI for Web Service definition using classes.
                    </para>
                </listitem>
            </itemizedlist>
            where <code>$name</code> is a class name for the Web Service definition mode using class and
            script name for  the Web Service definition mode using set of functions.
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_services"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.types">
        <title>Type mapping.</title>
        <para>
            Zend_Soap WSDL accessor implementation uses the following type mapping between PHP and SOAP types:

            <itemizedlist>
                <listitem>
                    <para>PHP strings &lt;-&gt; <code>xsd:string</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP integers &lt;-&gt; <code>xsd:int</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP floats and doubles &lt;-&gt; <code>xsd:float</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP booleans &lt;-&gt; <code>xsd:boolean</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP arrays &lt;-&gt; <code>soap-enc:Array</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP object &lt;-&gt; <code>xsd:struct</code>.</para>
                </listitem>
                <listitem>
                    <para>
                        PHP class &lt;-&gt; <code>tns:$className</code>
                        <footnote>
                            <para>
                                If <code>Zend_Soap_Wsdl</code> object is created with <code>$extractComplexTypes</code>
                                parameter turned off, then classes are translated to <code>xsd:anyType</code>.
                            </para>
                            <para>
                                Otherwise, <code>tns:$className</code> is used and type is described in details in &lt;types&gt;
                                WSDL section.
                            </para>
                        </footnote>.
                    </para>
                </listitem>
                <listitem>
                    <para>PHP void &lt;-&gt; empty type.</para>
                </listitem>
                <listitem>
                    <para>If type is not matched to any of these types by some reason, then <code>xsd:anyType</code> is used.</para>
                </listitem>
            </itemizedlist>
            
            Where <code>xsd:</code> is "http://www.w3.org/2001/XMLSchema" namespace, 
            <code>soap-enc:</code> is a "http://schemas.xmlsoap.org/soap/encoding/" namespace,
            <code>tns:</code> is a "target namespace" for a service.
        </para>
        
        <sect3 id="zend.soap.wsdl.types.retrieve">
            <title>Retrieving type information.</title>
            <para>
                <code>getType($type)</code> method may be used to get mapping for a specified PHP type: 

            <programlisting role="php"><![CDATA[
...
$wsdl = new Zend_Soap_Wsdl('My_Web_Service', $myWebServiceUri);

...
$soapIntType = $wsdl->getType('int');

...
class MyClass {
    ...
}
...
$soapMyClassType = $wsdl->getType('MyClass');]]></programlisting>
            </para>
        </sect3>

        <sect3 id="zend.soap.wsdl.types.add_complex">
            <title>Retrieving type information.</title>
            <para>
                <code>addComplexType($type)</code> method is used to add complex types (PHP classes) to a WSDL document.
            </para>
            
            <para>
                It's automatically used by <code>getType()</code> method to add corresponding complex type 
                if <code>$extractComplexTypes</code> parameter of the constructor is set tu <code>true</code>
                (otherwise classes are mapped to 'xsd:anyType' SOAP type). 
            </para>

            <para>
                <code>addComplexType()</code> method creates '/definitions/types/xsd:schema/xsd:complexType' element for 
                each described complex type with name of the specified PHP class.  
            </para>

            <para>
                All class public properties are described as corresponding elements of 'xsd:all' node attached to 'xsd:complexType'.  
            </para>
            
            <para>
                Class property <emphasis>MUST</emphasis> have docblock section with the described PHP type to have property
                included into WSDL description.
            </para>
            
            <para>
                <code>addComplexType()</code> checks if type is already described within types section of the WSDL document.  
            </para>
            
            <para>
                It prevent duplications if this method is called two or more times and recursion in the types defenition
                section.
            </para>
        
            <para>
                See <ulink url="http://www.w3.org/TR/wsdl#_types"/> for the details.
            </para>
        </sect3>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_documentation">
        <title><code>addDocumentation()</code> method.</title>
        <para>
            <code>addDocumentation($input_node, $documentation)</code> method adds human readable documentation using 
            optional 'wsdl:document' element. 
        </para>
        <para>
            '/definitions/binding/soap:binding' element is used to signify that the binding is bound to the SOAP protocol format. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_documentation"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.retrieve">
        <title>Get finilised WSDL document.</title>
        <para>
            <code>toXML()</code>, <code>toDomDocument()</code> and <code>dump($filename = false)</code> methods may be used to get
            WSDL document as an XML, DOM structure or a file. 
        </para>
    </sect2>

</sect1>
<commit_msg>Fixed typo in english doc of Zend_Soap -> no sync needed<commit_after><sect1 id="zend.soap.wsdl">
    <title>WSDL Accessor</title>
    
    <note>
        <para>
            <code>Zend_Soap_Wsdl</code> class is used by Zend_Soap_Server component internally to operate with WSDL
            documents. Nevertheless, you could also use functionality provided by this class for your own needs. 
        </para>
        <para>
            If you don't plan to do this, you can skip this documentation section.
        </para>
    </note>
    
    <sect2 id="zend.soap.wsdl.constructor">
        <title><code>Zend_Soap_Wsdl</code> constructor.</title>
        <para>
            <code>Zend_Soap_Wsdl</code> constructor takes three parameters:
            <orderedlist>
                <listitem>
                    <simpara><code>$name</code> - name of the Web Service being described.</simpara>
                </listitem>
                <listitem>
                    <simpara>
                        <code>$uri</code> - URI where the WSDL will be available 
                        (could also be a reference to the file in the filesystem.)
                    </simpara>
                </listitem>
                <listitem>
                    <simpara>
                        <code>$extractComplexTypes</code> - optional flag used to identify that complex types (objects)
                        should be extracted.
                    </simpara>
                </listitem>
            </orderedlist>
        </para>
    </sect2>
    
    
    <sect2 id="zend.soap.wsdl.addmessage">
        <title><code>addMessage()</code> method.</title>
        <para>
            <code>addMessage($name, $parts)</code> method adds new message description to the WSDL document 
            (/definitions/message element).
        </para>
        <para>
            Each message correspond to methods in terms of <code>Zend_Soap_Server</code> and 
            <code>Zend_Soap_Client</code> functionality.
        </para>
        <para>
           <code>$name</code> parameter represents message name.
        </para>
        <para>
           <code>$parts</code> parameter is an array of message parts which describe SOAP call parameters.
           It's an associative array: 'part name' (SOAP call parameter name) =&gt; 'part type'.
        </para>
        <para>
            Type mapping management is performed using <code>addTypes()</code>, <code>addTypes()</code> and
            <code>addComplexType()</code> methods (see below). 
        </para>
        <note>
            <para>
                Messages parts can use either 'element' or 'type' attribute for typing 
                (see <ulink url="http://www.w3.org/TR/wsdl#_messages"/>).
            </para>
            <para>
                'element' attribute must refer to a corresponding element of data type definition. 'type' attribute refers 
                to a corresponding complexType entry.
            </para>
            <para>
                All standard XSD types have both 'element' and 'complexType' definitions 
                (see <ulink url="http://schemas.xmlsoap.org/soap/encoding/"/>).
            </para>
            <para>
                All non-standard types, which may be added using <code>Zend_Soap_Wsdl::addComplexType()</code> method, are
                described using 'complexType' node of '/definitions/types/schema/' section of WSDL document.
            </para>
            <para>
                So <code>addMessage()</code> method always uses 'type' attribute to describe types.
            </para>
        </note>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_port_type">
        <title><code>addPortType()</code> method.</title>
        <para>
            <code>addPortType($name)</code> method adds new port type to the WSDL document 
            (/definitions/portType) with the specified port type name.
        </para>
        <para>
            It joins a set of Web Service methods defined in terms of Zend_Soap_Server implementation.
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_porttypes"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_port_operation">
        <title><code>addPortOperation()</code> method.</title>
        <para>
            <code>addPortOperation($portType, $name, $input = false, $output = false, $fault = false)</code> method 
            adds new port operation to the specified port type of the WSDL document 
            (/definitions/portType/operation).
        </para>
        <para>
            Each port operation corresponds to a class method (if Web Service is based on a class) or function
            (if Web Service is based on a set of methods) in terms of Zend_Soap_Server implementation.
        </para>
        <para>
            It also adds corresponding port operation messages depending on specified 
            <code>$input</code>, <code>$output</code> and <code>$fault</code> parameters.
            
            <note>
                <para>
                    Zend_Soap_Server component generates two messages for each port operation while describing service based on
                    <code>Zend_Soap_Server</code> class:
                    <itemizedlist>
                        <listitem>
                            <para>
                                input message with name <code>$methodName . 'Request'</code>.
                            </para>
                        </listitem>
                        <listitem>
                            <para>
                                output message with name <code>$methodName . 'Response'</code>.
                            </para>
                        </listitem>
                    </itemizedlist>
                </para>
            </note>
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_request-response"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_binding">
        <title><code>addBinding()</code> method.</title>
        <para>
            <code>addBinding($name, $portType)</code> method adds new binding to the WSDL document (/definitions/binding). 
        </para>
        <para>
            'binding' WSDL document node defines message format and protocol details for operations and messages 
            defined by a particular portType (see <ulink url="http://www.w3.org/TR/wsdl#_bindings"/>).
        </para>
        <para>
            The method creates binding node and returns it. Then it may be used to fill with actual data.
        </para>
        
        <para>
            Zend_Soap_Server implementation uses <code>$serviceName . 'Binding'</code> name for 'binding' element of WSDL document.
        </para>
    </sect2>
    
    
    <sect2 id="zend.soap.wsdl.add_binding_operation">
        <title><code>addBindingOperation()</code> method.</title>
        <para>
            <code>addBindingOperation($binding, $name, $input = false, $output = false, $fault = false)</code> method adds 
            an operation to a binding element (/definitions/binding/operation) with the specified name.
        </para>
        <para>
            It takes <code>XML_Tree_Node</code> object returned by <code>addBinding()</code> as an input 
            (<code>$binding</code> parameter) to add 'operation' element with input/output/false entries depending on
            specified parameters    
        </para>
        <para>
            Zend_Soap_Server implementation adds corresponding binding entry for each Web Service method with input and output 
            entries defining 'soap:body' element as 
            '&lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/&gt; 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_bindings"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_soap_binding">
        <title><code>addSoapBinding()</code> method.</title>
        <para>
            <code>addSoapBinding($binding, $style = 'document', $transport = 'http://schemas.xmlsoap.org/soap/http')</code> 
            method adds SOAP binding ('soap:binding') entry to the binding element (which is already linked to some port type) 
            with the specified style and transport (Zend_Soap_Server implementation uses RPC style over HTTP).
        </para>
        <para>
            '/definitions/binding/soap:binding' element is used to signify that the binding is bound to the SOAP protocol format. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_bindings"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_soap_operation">
        <title><code>addSoapOperation()</code> method.</title>
        <para>
            <code>addSoapOperation($binding, $soap_action)</code> 
            method adds SOAP operation ('soap:operation') entry to the binding element with the specified action. 
            'style' attribute of the 'soap:operation' element is not used since programming model (RPC-oriented or document-oriented)
            may be st using <code>addSoapBinding()</code> method 
        </para>
        <para>
            'soapAction' attribute of '/definitions/binding/soap:operation' element specifies the value of the SOAPAction header 
            for this operation. This attribute is required for SOAP over HTTP and <emphasis>must not</emphasis> be
            specified for other transports. 
        </para>
        <para>
            Zend_Soap_Server implementation uses <code>$serviceUri . '#' . $methodName</code> for SOAP operation action name. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_soap:operation"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.add_service">
        <title><code>addService()</code> method.</title>
        <para>
            <code>addService($name, $port_name, $binding, $location)</code> method adds '/definitions/service' element to 
            the WSDL document with the specified Wed Service name, port name, binding, and location.
        </para>
        <para>
            WSDL 1.1 allows to have several port types (sets of operations) per service. This ability is not used by 
            Zend_Soap_Server implementation and not supported by <code>Zend_Soap_Wsdl</code> class.   
        </para>
        <para>
            Zend_Soap_Server implementation uses:
            <itemizedlist>
                <listitem>
                    <para>
                        <code>$name . 'Service'</code> as a Web Service name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        <code>$name . 'Port'</code> as a port type name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        <code>'tns:' . $name . 'Binding'</code>
                            <footnote>
                                <para>
                                    <code>'tns:' namespace</code> is defined as script URI 
                                    (<code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code>).
                                </para>
                            </footnote> 
                            as binding name,
                    </para>
                </listitem>
                <listitem>
                    <para>
                        script URI<footnote><para><code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code></para></footnote>
                        as a service URI for Web Service definition using classes.
                    </para>
                </listitem>
            </itemizedlist>
            where <code>$name</code> is a class name for the Web Service definition mode using class and
            script name for  the Web Service definition mode using set of functions.
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_services"/> for the details.
        </para>
    </sect2>

    <sect2 id="zend.soap.wsdl.types">
        <title>Type mapping.</title>
        <para>
            Zend_Soap WSDL accessor implementation uses the following type mapping between PHP and SOAP types:

            <itemizedlist>
                <listitem>
                    <para>PHP strings &lt;-&gt; <code>xsd:string</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP integers &lt;-&gt; <code>xsd:int</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP floats and doubles &lt;-&gt; <code>xsd:float</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP booleans &lt;-&gt; <code>xsd:boolean</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP arrays &lt;-&gt; <code>soap-enc:Array</code>.</para>
                </listitem>
                <listitem>
                    <para>PHP object &lt;-&gt; <code>xsd:struct</code>.</para>
                </listitem>
                <listitem>
                    <para>
                        PHP class &lt;-&gt; <code>tns:$className</code>
                        <footnote>
                            <para>
                                If <code>Zend_Soap_Wsdl</code> object is created with <code>$extractComplexTypes</code>
                                parameter turned off, then classes are translated to <code>xsd:anyType</code>.
                            </para>
                            <para>
                                Otherwise, <code>tns:$className</code> is used and type is described in details in &lt;types&gt;
                                WSDL section.
                            </para>
                        </footnote>.
                    </para>
                </listitem>
                <listitem>
                    <para>PHP void &lt;-&gt; empty type.</para>
                </listitem>
                <listitem>
                    <para>If type is not matched to any of these types by some reason, then <code>xsd:anyType</code> is used.</para>
                </listitem>
            </itemizedlist>
            
            Where <code>xsd:</code> is "http://www.w3.org/2001/XMLSchema" namespace, 
            <code>soap-enc:</code> is a "http://schemas.xmlsoap.org/soap/encoding/" namespace,
            <code>tns:</code> is a "target namespace" for a service.
        </para>
        
        <sect3 id="zend.soap.wsdl.types.retrieve">
            <title>Retrieving type information.</title>
            <para>
                <code>getType($type)</code> method may be used to get mapping for a specified PHP type: 

            <programlisting role="php"><![CDATA[
...
$wsdl = new Zend_Soap_Wsdl('My_Web_Service', $myWebServiceUri);

...
$soapIntType = $wsdl->getType('int');

...
class MyClass {
    ...
}
...
$soapMyClassType = $wsdl->getType('MyClass');]]></programlisting>
            </para>
        </sect3>

        <sect3 id="zend.soap.wsdl.types.add_complex">
            <title>Retrieving type information.</title>
            <para>
                <code>addComplexType($type)</code> method is used to add complex types (PHP classes) to a WSDL document.
            </para>
            
            <para>
                It's automatically used by <code>getType()</code> method to add corresponding complex type 
                if <code>$extractComplexTypes</code> parameter of the constructor is set to <code>true</code>
                (otherwise classes are mapped to 'xsd:anyType' SOAP type). 
            </para>

            <para>
                <code>addComplexType()</code> method creates '/definitions/types/xsd:schema/xsd:complexType' element for 
                each described complex type with name of the specified PHP class.  
            </para>

            <para>
                All class public properties are described as corresponding elements of 'xsd:all' node attached to 'xsd:complexType'.  
            </para>
            
            <para>
                Class property <emphasis>MUST</emphasis> have docblock section with the described PHP type to have property
                included into WSDL description.
            </para>
            
            <para>
                <code>addComplexType()</code> checks if type is already described within types section of the WSDL document.  
            </para>
            
            <para>
                It prevents duplications if this method is called two or more times and recursion in the types definition
                section.
            </para>
        
            <para>
                See <ulink url="http://www.w3.org/TR/wsdl#_types"/> for the details.
            </para>
        </sect3>
    </sect2>

    <sect2 id="zend.soap.wsdl.add_documentation">
        <title><code>addDocumentation()</code> method.</title>
        <para>
            <code>addDocumentation($input_node, $documentation)</code> method adds human readable documentation using 
            optional 'wsdl:document' element. 
        </para>
        <para>
            '/definitions/binding/soap:binding' element is used to signify that the binding is bound to the SOAP protocol format. 
        </para>
        <para>
            See <ulink url="http://www.w3.org/TR/wsdl#_documentation"/> for the details.
        </para>
    </sect2>
    
    <sect2 id="zend.soap.wsdl.retrieve">
        <title>Get finilised WSDL document.</title>
        <para>
            <code>toXML()</code>, <code>toDomDocument()</code> and <code>dump($filename = false)</code> methods may be used to get
            WSDL document as an XML, DOM structure or a file. 
        </para>
    </sect2>

</sect1>

{'fraction_non_alphanumeric': 0.10764379689029031, 'fraction_numerical': 0.00255518103729477, 'mean_word_length': 1.5396244650006903, 'pattern_counts': {'":': 0, '<': 887, '<?xml version=': 0, '>': 892, 'https://': 0, 'lorem ipsum': 0, 'www.': 22, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3830446', 'n_tokens_mistral': 9980, 'n_tokens_neox': 9323, 'n_words': 2753}