Cast simplexml object to string when getting the response. Reference can also be a string.