Postanowiłem zbudować na podstawie artykułu z zenda.
Taj więc mam plik wsdl oraz zarejestrowaną metodę przy serwerze. Cały problem polega na tym, że po 2 stronie może być przeglądarka a nie skrypt php, gdyby było to połączenie php-soap-php bez problemu funkcjonowałoby serialize/unserialize.
Ale co zrobić w przypadku php-soap-js?

Korzystam z klas dostarczanych przez php.

Obecnie mam kod serwera:
  1. <?php
  2.  
  3. class GetList {
  4. private $users = array();
  5.  
  6. function __construct() {
  7. // Pobranie danych z bazy i stworzenie
  8. // tablicy user_id -> dane np:
  9. // $this->users[$user_id] = wiersz z bazy.
  10. $this->users[2] = array('Lukasz', 'Dywicki', '87-300', 'Brodnica');
  11. }
  12.  
  13. function getList($user_id) {
  14. if (isset($this->users[$user_id])) {
  15. return $this->users[$user_id]; //tablica!
  16. } else {
  17. throw new SoapFault(&#092;"Server\",\"Unknown User Id '$user_id', please/\");
  18. }
  19. }
  20. }
  21.  
  22. $server = new SoapServer(&#092;"stockquote.wsdl\");
  23. $server->setClass(&#092;"GetList\");
  24. $server->handle();
  25. ?>

Na pewno jest jakiś sposób na przesłanie tej tablicy, tylko go nie znam smile.gif. W tej chwili gdy wywołam $client->getList(2) dostaję w wyniku Array..
A i plik wsdl:
  1. <?xml version='1.0' encoding='UTF-8' ?>
  2. <definitions name='GetUserList'
  3.      targetNamespace='http://example.org/StockQuote'
  4.      xmlns:tns=' http://example.org/StockQuote '
  5.      xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
  6.      xmlns:xsd='http://www.w3.org/2001/XMLSchema'
  7.      xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
  8.      xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
  9.      xmlns='http://schemas.xmlsoap.org/wsdl/'>
  10.  
  11.      <message name='getListRequest'>
  12.            <part name='symbol' type='xsd:string'/>
  13.      </message>
  14.      <message name='getListResponse'>
  15.            <part name='Result' type='xsd:array'/><!-- czy to jest poprawne? -->
  16.      </message>
  17.      
  18.      <portType name='GetListPortType'>
  19.            <operation name='getList'>
  20.                  <input message='tns:getListRequest'/>
  21.                  <output message='tns:getListResponse'/>
  22.            </operation>
  23.      </portType>
  24.      
  25.      <binding name='GetListBinding' type='tns:GetListPortType'>
  26.            <soap:binding style='rpc'
  27.                  transport='http://schemas.xmlsoap.org/soap/http'/>
  28.  
  29.            <operation name='getList'>
  30.                  <soap:operation soapAction='urn:xmethods-delayed-quotes#getList'/>
  31.                  <input>
  32.                        <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
  33.                              encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
  34.                  </input>
  35.                  <output>
  36.                        <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
  37.                              encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
  38.                  </output>
  39.            </operation>
  40.  
  41.      </binding>
  42.  
  43.      <service name='GetListService'>
  44.            <port name='GetListPort' binding='GetListBinding'>
  45.                  <soap:address location='http://download/xul-builder/www/soap/server3.php'/>
  46.            </port>
  47.      </service>
  48. </definitions>

Czy ktoś, kto dobrnął tak daleko jest w stanie mi pomóc? smile.gif
Poradziłem sobie z problemem
Zdefiniowałem typ UserData oraz ArrayOfUser data, następnie napisałem odpowiednią funkcję w JS, która konwertuje odpowiedź do tablicy.