Soapclient object already has parsed the XML to a response structure (
var_dump($result) and see). If you want to store it as a string, you'd have make it a string again somehow (
serialize() if only PHP code needs to read it,
json_encode() if you want to make it more language-agnostic are the usual suspects).
If you need to store the raw
xml response, add
array('trace' => true); as the 2nd parameter in
SoapClient's constructor, and call
But, if you just want the answer used then & there the
$result response is already parsed for you.