First Connection Blues

263 views
Skip to first unread message

russ harris

unread,
Aug 21, 2015, 10:53:39 PM8/21/15
to PHRETS


OK, what am I doing wrong??? I miss the old phRETS already!


<?php

require_once("vendor/autoload.php");

$log = new \Monolog\Logger('PHRETS');
$log->pushHandler(new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG));

$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://rets.XXX.matrix.com/matrix/login.ashx')
        ->setUsername('XXhiddenXX')
        ->setPassword('XhiddenX')
        ->setRetsVersion('1.8');

$rets = new \PHRETS\Session($config);
$rets->setLogger($log);

$connect = $rets->Login();


$system = $rets->GetSystemMetadata();
var_dump($system);

$resources = $system->getResources();
$classes = $resources->first()->getClasses();
var_dump($classes);

$classes = $rets->GetClassesMetadata('Property');
var_dump($classes->first());

$objects = $rets->GetObject('Property', 'Photo', '00-1669', '*', 1);
var_dump($objects);

$fields = $rets->GetTableMetadata('Property', 'A');
var_dump($fields[0]);

$results = $rets->Search('Property', 'A', '*', ['Limit' => 3, 'Select' => 'LIST_1,LIST_105,LIST_15,LIST_22,LIST_87,LIST_133,LIST_134']);
foreach ($results as $r) {
    var_dump($r);
}


?>


russ@OWLS-OptiPlex-745:~/RETS$ php myfirstrest20connection.php
[2015-08-21 21:41:32] PHRETS.DEBUG: Loading Monolog\Logger logger [] []
[2015-08-21 21:41:32] PHRETS.DEBUG: Sending HTTP Request for http://rets.nwa.mlsmatrix.com/matrix/login.ashx (Login) {"headers":{"User-Agent":"PHRETS/2.0","RETS-Version":"RETS/1.8","Accept-Encoding":"gzip","Accept":"*/*"},"cookies":[]} []
[2015-08-21 21:41:33] PHRETS.DEBUG: Response: HTTP 200 [] []
PHP Fatal error:  Uncaught exception 'PHRETS\Exceptions\CapabilityUnavailable' with message ''GetMetadata' tried but no valid endpoint was found.  Did you forget to Login()?' in /home/russ/RETS/src/Session.php:329
Stack trace:
#0 /home/russ/RETS/src/Session.php(256): PHRETS\Session->request('GetMetadata', Array)
#1 /home/russ/RETS/src/Session.php(169): PHRETS\Session->MakeMetadataRequest('METADATA-SYSTEM', 0, 'metadata.system')
#2 /home/russ/RETS/myfirstrest20connection.php(20): PHRETS\Session->GetSystemMetadata()
#3 {main}
  thrown in /home/russ/RETS/src/Session.php on line 329

Troy Davisson

unread,
Aug 21, 2015, 11:22:12 PM8/21/15
to phr...@googlegroups.com
Have you confirmed through www.retsmd.com that the credentials you're using are working?

--
You received this message because you are subscribed to the Google Groups "PHRETS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phrets+un...@googlegroups.com.
To post to this group, send email to phr...@googlegroups.com.
Visit this group at http://groups.google.com/group/phrets.
For more options, visit https://groups.google.com/d/optout.

russ harris

unread,
Aug 21, 2015, 11:29:15 PM8/21/15
to phr...@googlegroups.com

I have confirmed on retsmd for the old RETS server I have been using but we are switching to matrix. Matrix server isn't playing well with retsmd. I have tested credentials on new Matrix server with the connection tester they gave me. My credentials aren't changing. I feel good about them.

Retsmd page doesn't work with the new matrix server northwest Arkansas MLS is rolling out. But they won't hear my complaints. Wish they would fix their problems.

You received this message because you are subscribed to a topic in the Google Groups "PHRETS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phrets/S1kdXkWFlsE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phrets+un...@googlegroups.com.
Message has been deleted
Message has been deleted

russ harris

unread,
Aug 22, 2015, 12:01:07 PM8/22/15
to PHRETS
How do I see the http response I am getting back from the Matrix server? I wonder if it is looking for me to type in username and password....

http://rets.nwa.mlsmatrix.com/matrix/login.ashx

Reply all
Reply to author
Forward
0 new messages