You may be left wondering, as I was, how to return a complex type - consider the following WSDL snippets, for a method called Login:
Here's a working Login function that I've added with add SoapServer::addFunction
function Login($username, $password)
{
return array("LoginResult", array("Id"=>1, "Name"=>"Nathan", "Nickname"=>"Nathan", "Email"=>"email address") );
}
The UserInfo complextype is represented by the inner array. The outer array has just one element, "LoginResult". The LogineResponse element seems to be treated as a one-member array by PHP.