Things that I've searched a lot for that might be useful to somebody:
If you are using Zend Studio, you can easily generate a wsdl file using the WSDL Generator if you document your code using PHPDOC.
One thing a lot of people are searching everywhere, is the way to pass/return an array of variables... In your PHPDOC block use the [] after the variable name like this
<?php
class SoapServer {
public function foo ($a, $b, $c){
}
}
?>
This way, the function will require an array of integers for $a, an array of strings for $b and an array of objets of Class "bar" for $c
In the WSDL, you'll find something like this
<xsd:complexType name="barArray">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:bar[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="bar">
<xsd:all>
<xsd:element name="var1" type="xsd:boolean"/>
<xsd:element name="var2" type="xsd:integer"/>
<xsd:element name="var3" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
I didn't define anywhere the barArray type, Zend's WSDL Generator generated it automatically...
If you are not using Zend you can generate the wsdl file manually.
Hope it helps someone