Diff for Doc/Dev/SOAP between 4 and 5

**##red|This is documentation for Horde 3.##**
+ Using Horde as a SOAP server

Horde applications can have their APIs automatically served through SOAP, XML-RPC, and with the right API methods implemented, !WebDAV and SyncML.

(more details on this should go here or be linked here)

++ Complex Types

You can define complex types in the {{$_types}} array in {{app/lib/api.php}} Here is an example:

<code type="php">
$_types = array(
    'attrValues' => array('attr'   => 'string',
                          'values' => '{urn:horde}stringArray'),
    'attrValuesArray' => array(array('item' => '{urn:horde}serviceman_attrValues')),

which automagically generates this WSDL:

<complexType name="serviceman_attrValues">
                <element name="attr" type="xsd:string"/>
                <element name="values" type="tns:stringArray"/>
<complexType name="serviceman_attrValuesArray">
                <restriction base="SOAP-ENC:Array">
                        <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:serviceman_attrValues[]"/>

The application which uses these types serves several thousand SOAP transactions a day, with a !J2EE/Axis application on the other end.

Here is another example including both the $_types and $_services definitions for an application which checks ADSL coverage areas:

<code type="php">
$_types['coverageResults'] = array(
    'number'   => 'string',
    'initial_range' => 'string',
    'final_range' => 'string',
    'miga' => 'string',
    'final_range' => 'string',
    'miga' => 'string',
    'central' => 'string',
    'demarcacion' => 'string',
    'services' => 'string',

$_types['coverageResultsArray'] = array(
    array('item' => '{urn:horde}coverage_coverageResults')

$_services['check'] = array(
    'args' => array('numbers' => '{urn:horde}stringArray'),
    'checkperms' => false,
    'type' => '{urn:horde}coverage_coverageResultsArray'

function _coverage_check($numbers) {
    // code that returns an array of results
    return array($return);