Resource Classes returns empty set

191 views
Skip to first unread message

Harvey Jake Opena

unread,
Jan 9, 2018, 10:15:35 PM1/9/18
to PHRETS
I am able to get Resources from GSMLS but when getting the Resource Classes I get an empty set when it is actually not.

I have tried both of the following:

$resource->getClasses();

and

$rets->GetClassesMetadata('PROPERTY');

Both return an empty  set.


When using retsmd.com, the Resource Classes is not really empty set. 

I can even access each Class metadata:

$rets->GetTableMetadata('PROPERTY', 'RES');

Also I can search through each Class listings:

$results = $rets->Search('PROPERTY', 'RES', '*', []);


Any help would be appreciated.

Andy Wallace

unread,
May 18, 2018, 12:25:21 PM5/18/18
to PHRETS
I'm having the same issue. Appreciation for help now doubled....

Andy Wallace

unread,
May 18, 2018, 12:46:47 PM5/18/18
to PHRETS
Further information: We currently pull information from this mls via perl scripts and direct cURL queries. Looking at what we are doing there:

/usr/local/bin/curl  
--anyauth 
--user '<username>:<password> 
--user-agent '<our user agent>' -H 'RETS-Version: RETS/1.7.2' -H 'RETS-UA-Authorization:Digest 532377ba9da3eb19cd7b30ba321e0ae5'   
--cookie-jar '<cookie-file-name>'  
--cookie '<cookie-file-name>'


And comparing to the options generated inside the PHRETS Session:

Array
(
    [auth] => Array
        (
            [0] => <username>
            [1] =><password>
            [2] => digest
        )

    [headers] => Array
        (
            [User-Agent] => <our user agent>
            [RETS-Version] => RETS/1.7.2
            [Accept-Encoding] => gzip
            [Accept] => */*
            [RETS-UA-Authorization] => Digest 7edb25b1d5ca7dfdd622b3bc6a895629
        )

    [curl] => Array
        (
            [10031] => /tmp/phretsuPReds
        )

    [query] => Array
        (
            [Type] => METADATA-OBJECT
            [ID] => PROPERTY
            [Format] => STANDARD-XML
        )
)

The only real differences I see are the cookie commands, and the hash passed in for the digest. So I am at a loss.




On Tuesday, January 9, 2018 at 7:15:35 PM UTC-8, Harvey Jake Opena wrote:

Hayim Shaul

unread,
Sep 16, 2021, 11:48:47 PM9/16/21
to PHRETS
Hi Andy,

I'm having the same problem.
How did you resolve your issue with gsmls?

Thanks in advance,
Hayim.

Andy Wallace

unread,
Mar 1, 2022, 5:40:07 PM3/1/22
to PHRETS
Hayim - I'm just looking into this again. Still getting the same problem.

mark enriquez

unread,
Mar 1, 2022, 6:06:52 PM3/1/22
to phr...@googlegroups.com
Hi...if I remember correctly you must use the SetCookie() method and make sure it points to a writable dir somewhere.

Give it a try if you haven't yet.

Best of luck,
- mark

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/phrets/025758f2-0aea-4633-a3a2-3f4c286f998en%40googlegroups.com.

Andy Wallace

unread,
Mar 1, 2022, 6:58:26 PM3/1/22
to PHRETS
Thanks Mark - didn't help. I found setCookieJar, and called that, which failed weirdly, and then found this option to get around what looks like a bug in Guzzle by setting the curl cookie more directly:

            $this->rets_session->getClient()->setDefaultOption('config', [
                                                                    'curl' => [
                                                                        CURLOPT_COOKIEFILE => tempnam(null, 'phrets')
                                                                    ]
                                                                ]);
but this actually fails with a curl error: "Could not resolve host",  which I'm guessing is because the curl URL hasn't been set yet. Still searching.
Reply all
Reply to author
Forward
0 new messages