<sect1 id="zend.soap.autodiscovery.class">
    <title>Class autodiscovering.</title>

    <para>
        If class is used to provide SOAP server functionality, then the same class should be provided to 
        <code>Zend_Soap_AutoDiscovery</code> for WSDL generation:
        <programlisting role="php"><![CDATA[<?php
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('My_SoapServer_Class');
$autodiscover->handle();]]></programlisting>
    </para>
    
    <para>
        The following rules are used while WSDL generation:
        <itemizedlist>
            <listitem>
                <para>Generated WSDL describes an RPC style Web Service.</para>
            </listitem>
            <listitem>
                <para>Class name is used as a name of the Web Service being described.</para>
            </listitem>
            <listitem>
                <para>
                    <code>'http://'  .$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']</code> is used 
                    as an URI where the WSDL is available.
                </para>
                <para>
                     It's also used as a target namespace for all service related names (including 
                     described complex types).
                </para>
            </listitem>
            <listitem>
                <para>
                    Class methods are joined into one <ulink url="http://www.w3.org/TR/wsdl#_porttypes">Port Type</ulink>.
                </para>
                <para>
                    <code>$className . 'Port'</code> is used as Port Type name.
                </para>
            </listitem>
            <listitem>
                <para>Each class method is registered as a corresponding port operation.</para>
            </listitem>
            <listitem>
                <para>Each method prototype genrerates corresponding Request/Response messages.</para>
                <para>Method may have several prototypes if some method parameters are optional.</para>
            </listitem>
        </itemizedlist>
    </para>
    
    <note>
        <title>Important!</title>
        <para>
            WSDL autodiscovery utilizes the PHP docblocks provided by the developer to determine the parameter and return types. 
            In fact, for scalar types, this is the only way to determine the parameter types, and for return types, this is the 
            only way to determine them.
        </para>
        <para>
            That means, providing correct and fully detailed docblocks is not only best practice, but is required for discovered class. 
        </para>
    </note>
</sect1>

Move SOAP Documentation into standard library.
Move SOAP Documentation into standard library.

git-svn-id: abaeb2b3ba5a94ed391a9405ad7d63d0414021c9@9884 44c647ce-9c0f-0410-b52a-842ac1e357ba
