Witam
Mam problem z odebraniem wartości zwracanej przez usługę sieciową.
<?php
$ws = new soapclient('http://adres');
$gat = $ws->call('lista_gatunkow');
?>
Fukcja lista_gatunkow jest bezparametrowa i powinna zwracac tablice gatunkow, tymczasem print_r($gat) daje pustkę.
Sama usługa działa, gdyż print_r($ws->response) daje
HTTP/1.1 200 OK
Date: Mon, 23 Jan 2006 13:50:37 GMT
Server: Apache/1.3.29 (Win32)
php/5.0.5 X-Powered-By: php/5.0.5
Connection: close
Content-Type: text/html; charset=iso-8859-2
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ksiegarnia" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:lista_gatunkowResponse>
<lista_gatunkowReturn SOAP-ENC:arrayType="SOAP-ENC:Struct[3]" xsi:type="SOAP-ENC:Array">
<item xsi:type="SOAP-ENC:Struct">
<Id xsi:type="xsd:string">1</Id>
<Nazwa xsi:type="xsd:string">Krymina3</Nazwa>
</item>
<item xsi:type="SOAP-ENC:Struct">
<Id xsi:type="xsd:string">2</Id>
<Nazwa xsi:type="xsd:string">SF</Nazwa>
</item>
<item xsi:type="SOAP-ENC:Struct">
<Id xsi:type="xsd:string">3</Id>
<Nazwa xsi:type="xsd:string">Romans</Nazwa>
</item>
</lista_gatunkowReturn>
</ns1:lista_gatunkowResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
W czym moze byc problem?
Z gory dziekuję za pomoc
Ten post edytował jam 23.01.2006, 15:01:12