MichaelEvangelista
asked on
How to connect to RETS MLS Data with ColdFusion?
A client's MLS company offers realty listing information in the form of RETS xml data.
I've done several xml-based sites, usually reading the xml data into a mySQL database, but from what I am seeing, RETS is a bit different than a usual RSS feed, or visible XML file.
I am looking for sample code, or a UDF / CFC... or a decent tutorial... on connecting to RETS with ColdFusion.
Ideally I could read the data into a mySQL database once per day, and run my own searches and display templates against my familiar cf/db format.
So.. what I'd *really* like, is the code - or an explanation of building same - to read from the RETS server into a SQL insert query. From there I'd be home free.
I've done several xml-based sites, usually reading the xml data into a mySQL database, but from what I am seeing, RETS is a bit different than a usual RSS feed, or visible XML file.
I am looking for sample code, or a UDF / CFC... or a decent tutorial... on connecting to RETS with ColdFusion.
Ideally I could read the data into a mySQL database once per day, and run my own searches and display templates against my familiar cf/db format.
So.. what I'd *really* like, is the code - or an explanation of building same - to read from the RETS server into a SQL insert query. From there I'd be home free.
What version of RETS are you trying to access?
ASKER
They told me it was 1.5, but the 'metadata version' is 2.01 (see below)
I have a url and a username/pw - if I go to the url and log in, I see a short XML file like this:
<RETS ReplyCode="0" ReplyText="Success">
<RETS-RESPONSE>
MemberName=xxxxxxxxxxx
User=xxxxxxxxxxxx
Broker=xxxxxxxxxx
MetadataVersion=02.01.4465 3
MinMetadataVersion=02.01.4 4653
Login=/xxxxxxxxxxxxxxxxx
Search=/xxxxxxxxxxxxxxxxxx x
GetMetadata=/prod_150r10/G etMetadata
GetObject=/prod_150r10/Get Object
Logout=/prod_150r10/Logout
</RETS-RESPONSE>
</RETS>
Beyond that, I am not sure what to do!
I found a free RETS client called VieleRETS (php)
It is easy to set up, and everything seems to be functioning as expected ...
except I am not pulling any listings!
Using the Viele interface, I can see the available columns for the data, and if I choose "Office" as
the resource, I can see that there are a few hundred entries,
but if I choose "Property", and then "Residential" or "Commercial" as the
listing 'class', I get no listings found.
I am obviously well-connected because I am seeing the available fields and
getting success messages for the general connection.
However, both the auto-detect and the debug show some of the responses as
"unauthorized".
I have a feeling I am so close to success, yet something must be wrong
Any help you can give at this point is greatly appreciated!
I have a url and a username/pw - if I go to the url and log in, I see a short XML file like this:
<RETS ReplyCode="0" ReplyText="Success">
<RETS-RESPONSE>
MemberName=xxxxxxxxxxx
User=xxxxxxxxxxxx
Broker=xxxxxxxxxx
MetadataVersion=02.01.4465
MinMetadataVersion=02.01.4
Login=/xxxxxxxxxxxxxxxxx
Search=/xxxxxxxxxxxxxxxxxx
GetMetadata=/prod_150r10/G
GetObject=/prod_150r10/Get
Logout=/prod_150r10/Logout
</RETS-RESPONSE>
</RETS>
Beyond that, I am not sure what to do!
I found a free RETS client called VieleRETS (php)
It is easy to set up, and everything seems to be functioning as expected ...
except I am not pulling any listings!
Using the Viele interface, I can see the available columns for the data, and if I choose "Office" as
the resource, I can see that there are a few hundred entries,
but if I choose "Property", and then "Residential" or "Commercial" as the
listing 'class', I get no listings found.
I am obviously well-connected because I am seeing the available fields and
getting success messages for the general connection.
However, both the auto-detect and the debug show some of the responses as
"unauthorized".
I have a feeling I am so close to success, yet something must be wrong
Any help you can give at this point is greatly appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the info - I may have more questions to get this working but will assign points now, best answer I got - thanks again
http://www.rets.org/documentation
After that, there are some other sites that have some articles that might provide a good documentation path for your research:
http://coldfusion.sys-con.com/read/40704.htm
http://www.realestatewebmasters.com/thread5795.html <-- PHP Version here... could be tweaked perhaps.
http://www.realestatewebmasters.com/showthread.php?t=14661&page=2
^^ Read post #17 and #21 on page 3 of the forum... - sadly the PHP Nazi's on this site banned him for calling the guy that said CF was dead and worthless an 'idiot'... which I certainly agree he was... however, he was also a moderator... :D