I have a SOAP service returning this to me
<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://
www.w3.org/1999/XMLSchema-instance">
<soapenv:Body>
<ns1:exportStationCodesXMLResponse soapenv:encodingStyle="http://
schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://uri.not">
<exportStationCodesXMLReturn xsi:type="ns2:Document"
xmlns:ns2="http://xml.apache.org/xml-soap">
<nds>
<data>
<r>
<c v="NERR_Site_ID"/>
<c v="Station_Code"/>
<c v="Station_Name"/>
<c v="Lat_Long"/>
<c v="Latitude"/>
<c v="Longitude"/>
<c v="Status"/>
<c v="Active_Dates"/>
<c v="Params_Reported"/>
</r>
<r>
<c v="ace "/>
<c v="acebbnut "/>
<c v="Big Bay "/>
<c v="32° 29' 22.92 N, 80° 19' 12.72 W"/>
<c v="32.4897"/>
<c v="80.3202"/>
<c v="Active "/>
<c v="Feb 2002-"/>
<c v="PO4F,NH4F,NO2F,NO3F,NO23F,DIN,CHLA_N"/>.....
I wrote a small php sample call like so:
<?php
$wsdl=new SoapClient('http://cdmo.baruch.sc.edu/webservices/
xmldatarequest.cfc?wsdl', array('trace' =1));
$result = $wsdl->exportStationCodesXML();
var_dump($result);
//echo "RESPONSE:\n" . $wsdl->__getLastResponse() . "\n";
?>
But what I get back are a bunch of arrays of empty strings like so
object(stdClass)#2 (1) { ["nds"]= object(stdClass)#3 (1)
{ ["data"]= object(stdClass)#4 (1) { ["r"]= array(301) { [0]=>
object(stdClass)#5 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0) "" [3]= string(0) "" [4]=>
string(0) "" [5]= string(0) "" [6]= string(0) "" [7]= string(0)
"" [8]= string(0) "" [9]= string(0) "" } } [1]=>
object(stdClass)#6 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0) "" [3]= string(0) "" [4]=>
string(0) "" [5]= string(0) "" [6]= string(0) "" [7]= string(0)
"" [8]= string(0) "" [9]= string(0) "" } } [2]=>
object(stdClass)#7 (1) { ["c"]= array(10) { [0]= string(0)
"" [1]= string(0) "" [2]= string(0)....
(I dont think you will be able to run my code, as my ip is trusted to
execute the WS only)
My question is I NEED to get to those attributes (the 'v=') and I
would rather not do it by reparsing the response (from
__getLastResponse). What am I missing??!?!?