primero registro la clase de esta forma:
Código PHP:
//registrar la funcion de consulta de usuarios
$servidor->register('consultaUsuarioss',
array('sexo'=>'xsd:string'), //tipo de dato entrada
array('return'=>'tns:ArregloDeEstructuras'), //tipo de dato salida
$ns, false,
'rpc', //tipo documento
'literal', //tipo codificacion
'Documentacion de consultaUsuarios') ;
Código PHP:
$servidor->wsdl->addComplexType(
'Estructura',
'complexType',
'struct',
'all',
'',
array(
'Id' => array('name' => 'Id', 'type' => 'xsd:string'),
'Nombre'=>array('name' => 'Nombre', 'type' => 'xsd:string'),
'Apellido'=>array('name' => 'Apellido', 'type' => 'xsd:string')
)
);
//configurar arreglo de la estructura
$servidor->wsdl->addComplexType(
'ArregloDeEstructuras',
'complexType',
'array',
'sequence',
'http://schemas.xmlsoap.org/soap/encoding/:Array',
array(),
array(
array('ref' => 'http://schemas.xmlsoap.org/soap/encoding/:arrayType',
'wsdl:arrayType' => 'tns:Estructura[]'
)
),'tns:Estructura');
Código PHP:
function consultaUsuarioss($sexo)
{
$apellido = "manuel";
$id = "243";
$arreglo[] = array('Id'=>$id, 'Nombre'=>$sexo, 'Apellido'=>$apellido);
return $arreglo;
}
gracias!