Answer the question
In order to leave comments, you need to log in
How to handle soap response?
I am making a request to a SOAP server.
$client = new SoapClient($url);
$res = $client->__doRequest($request, $location, $action, $version);
$ob = simplexml_load_string($res);
Answer the question
In order to leave comments, you need to log in
1. If you do print_r((string) $ob), what will it show?
2. Call libxml_get_errors, what will it return?
3. Before parsing, set whether warnings will appear?
error_reporting(E_ALL | E_WARNING);
ini_set(E_ALL | E_WARNING);
4. What's in $ob->children(). ?
5. You can also parse such an answer with a regular expression.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question