Reputation: 16541
<?php
$client = new SoapClient("http://localhost:8080/calculator?wsdl");
$result = $client->add(3,3);
echo $result;
?>
Getting error:
Object of class stdClass could not be converted to string
How can I print out the response from SoapClient
?
Upvotes: 0
Views: 608
Reputation: 834
The result is a stdClass object. You can "print" an object using print_r which is a utility you can use to inspect the members of the object:
print_r($result);
Upvotes: 1