Hello,
I am quite new to PHP so am still finding my way around so this may have a really obvious answer, but my searches so far have not given me the answer.
I have a need to connect to two web services and am using the SoapClient function. One of the web services is working fine as it returns the data as an object which I am able to use "$result->
-> [Required value from data];" and it returns the value from the XML as expected.
The code I am using is, minus the values as they are user tokens, etc.
[code=php:0]
$client = new SoapClient("Web Service URL");
$result = $client->GetHistory(array("Parameter1" => "Value","Parameter2" => "Value"));
print_r($result);
[/code]
However the other web service returns the data as a string of XML:
<?xml version="1.0"?><tag1><tag2>Data</tag2><tag2>Data</tag2><tag3>Data</tag3></tag1>
The problem is that when returned if I output using print_r($result) to see what is contained all of the tags have been removed including the "<?xml version="1.0"?>". This makes the data unusable as it is just a long string now with no seperators to identify the seperation of the data.
Why is this happening? What have I missed?
Any help would be much appreciated.
Thanks,
Lee