Failure parsing GetObject response

35 views
Skip to first unread message

wbo...@gmail.com

unread,
Aug 28, 2020, 10:27:54 AM8/28/20
to PHRETS
Using phRETS 2.0, attempting to download media for a given resource.  I issue the following query to the server

$objects = $retsSession->GetObject('Property', 'ExtraLargePhoto', '1329630', '*', 0);
var_dump($objects);

The error I am receiving:

Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in <path>\vendor\troydavisson\phrets\src\Http\Response.php on line 31

Warning: SimpleXMLElement::__construct(): --rets.object.content.boundary.1585267681520 in <path>\vendor\troydavisson\phrets\src\Http\Response.php on line 31

Warning: SimpleXMLElement::__construct(): ^ in <path>\vendor\troydavisson\phrets\src\Http\Response.php on line 31

Fatal error: Uncaught Exception: String could not be parsed as XML in <path>\vendor\troydavisson\phrets\src\Http\Response.php:31
Stack trace:
#0<path>\vendor\troydavisson\phrets\src\Http\Response.php(31): SimpleXMLElement->__construct('--rets.object.c...')
#1 <path>\vendor\troydavisson\phrets\src\Session.php(382): PHRETS\Http\Response->xml()
#2 <path>\vendor\troydavisson\phrets\src\Session.php(129): PHRETS\Session->request('GetObject', Array)
#3 <path>(109): PHRETS\Session->GetObject('Property', 'ExtraLargePhoto', '1329630', '*')
#4 {main}
  thrown in <path>\vendor\troydavisson\phrets\src\Http\Response.php on line 31


Attempting to download just the location doesn't work either.  It's almost like the response body is missing the reply code for the first object

--rets.object.content.boundary.1585267681520
Content-ID: 1329630
Object-ID: 0
Content-Description: Exterior Front
Content-Type: text/xml
Location: https://rets.stellar.mlsmatrix.com/Rets/GetRetsMedia.ashx?Key=1329630&TableID=9&Type=1&Number=0&Size=3&usd=-1&ust=bJgAAGJzUD8SYL9ECWyz*kbFVx7KKzfu3ZzFm126cN0Jp(aDl2Y4Zw))

<RETS ReplyCode="0" ReplyText="Operation Successful" />

--rets.object.content.boundary.1585267681520
Content-ID: 1329630
Object-ID: 1
Content-Description: Exterior Front
Content-Type: text/xml
Location: https://rets.stellar.mlsmatrix.com/Rets/GetRetsMedia.ashx?Key=1329630&TableID=9&Type=1&Number=0&Size=3&usd=-1&ust=bJgAAGJzUD8SYL9ECWyz*kbFVx7KKzfu3ZzFm126cN0Jp(aDl2Y4Zw))

Is there a setting I need to add when creating the session to have it not strip the first part of the response?
Reply all
Reply to author
Forward
0 new messages