Hello ppl,
Can pls anyone help on the following problem?
I am writting an application that consumes several web services, using SoapClient or cURL client.
The problem is that the response of one of these services is really weird... From the server-side specs the response should be a defined object. From my client side of view, the response is a string of an xml.
In my code :
$client = SoapClient(...);
$result = $client->myMethod();
OR
$result = curl_exec(...)
Result :
- when I use: "echo $result", the output is a string with only tag values displayed sequentially
- when I use: "var_dump($result)", the result is an empty object!
- when I use: "echo htmlentities($result)", the output is the xml response
- I have also tried to convert this string (of xml) to an array, using SimpleXML, but it resulted in an empty array...
My question is how such a response can be handled! I want to be able to retrieve specific values by
i.e. $result->item, and not by parsing the string (even this is not easily possible since the tags in a string have strange behaviour)
Can someone give any idea?
Thanks a lot 🙂