Re: Getting at soap results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The best I can suggest you is try to see the structure of the return data
with print_r($result). Or try something like $result->row[0]->result.
"Brooks Talley" <brooks@frnk.com> wrote in message
D5109C0C09E41243BCF092338BC825D3226F35@aa587.frnk.com">news:D5109C0C09E41243BCF092338BC825D3226F35@aa587.frnk.com...
I've got PHP which is successfully retrieving a SOAP document using the
WSDL method.  The problem is, I can't get at the resulting data.  I'm
sure this is a stupid question, but I'm so brain dead from the SOAP work
that I'm probably missing something obvious.

This php code:
<?php
$client=new
SoapClient("http://67.125.166.237/soap/test",array('trace'=>"1"));
$result=$client->echo(array('i'=>"23"));
?>

...is successfully retrieving a soap document (pasted at the bottom of
this email).  The problem is, now I've got $result, and it's an object,
and I can get at $result->echoResult->enc_value and stuff, but I can't
seem to get at the actual row data.  Can anyone give me some tips?  If
you want to connect to my test soap service, by all means, have at it.
You just supply "i", and it returns two rows with that value as
"result."

Thanks
-Brooks

-------- soap document (from $client->__getLastResponse()) ----------
<?xml version="1.0" encoding="utf-8" ?>
    <SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema'
 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
 xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'

xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/type
s'

xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/ty
pes/SqlMessage'

xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SO
AP/types/SqlResultStream' xmlns:tns='http://frnk.com/soap/test'>
      <SOAP-ENV:Body>
        <tns:echoResponse>
          <tns:echoResult xsi:type='sqlresultstream:SqlResultStream'>
            <sqlresultstream:SqlXml xsi:type="sqltypes:SqlXml">
              <SqlXml>
                <row>
                  <result>
                    23
                  </result>
                </row>
                <row>
                  <result>
                    23
                  </result>
                </row>
              </SqlXml>
            </sqlresultstream:SqlXml>
            <sqlresultstream:SqlResultCode
xsi:type='sqltypes:SqlResultCode'>
              0
            </sqlresultstream:SqlResultCode>
          </tns:echoResult>
        </tns:echoResponse>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux