Эй, ребята, как я могу вернуть конверт или массив SOAP со всеми выбранными пользователями?
я пытаюсь вернуть массив результатов базы данных, но не возвращаю, вот мой wsdl
<?xml version='1.0' encoding='utf-8' ?>
<definitions name="ClientSearch" targetNamespace="urn:ClientSearch" xmlns:typens="urn:ClientSearch" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="searchUser">
<part name="userName" type="xsd:string" />
</message>
<message name="searchUserResponse">
<part name="searchUserReturn" type="xsd:string" />
</message>
<portType name="searchUserPortType">
<operation name="searchUser">
<input message="typens:searchUser" />
<output message="typens:searchUserResponse" />
</operation>
</portType>
<binding name="searchUserBinding" type="typens:searchUserPortType">
<operation name="searchUser">
<soap:operation soapAction="urn:searchUserAction" />
<input>
<soap:body namespace="urn:ClientSearch" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body namespace="urn:ClientSearch" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="clientSearchService">
<port name="searchUserPort" binding="typens:searchUserBinding">
<soap:address location="http://localhost/service/server.php"/>
</port>
</service>
</definitions>
Функция i, используемая для получения данных в базе данных
public function searchUser( $Name ){
$this->__getDatabase();
$this->Name = (string)$Name;
if( !is_null( $this->Name ) ){
$query = $this->db->query( 'SELECT * FROM `t_users` WHERE `nome` LIKE "%'.$this->Name.'%"' );
}
}
Страница звонков webserviçe
<?php
ini_set("soap.wsdl_cache_enabled", "0");
$oSoapClient = new SOAPClient("http://localhost/service/service.wsdl");
var_dump( $oSoapClient->searchUser( 'name' ) ) ;
?>