Skip to main content
Alan_Koenig_920
Known Participant
August 11, 2015
Question

Cold Fusion and RETS

  • August 11, 2015
  • 2 replies
  • 1399 views

I am working on a real estate application.  

I am having difficulty with the pulling down the information from my MLS Server (Hawaii in case your wondering).

I have looked through the site and have played with the different snippets of code that are on different sites and have played with error after error.  Is there anyone out there that can guide me in the right direction?

    This topic has been closed for replies.

    2 replies

    James Moberg
    Inspiring
    August 11, 2015

    Implementations of RETS are standardized, but vary from provider to provider.  What works for one RETS data provider may not work for another depending on how each service is configured, so there's no simple API.  Depending on the version of ColdFusion you are using, you may also encounter CFHTTP connection or performance issues.  I'd recommend avoiding real-time connections to RETS as it can be unresponsive at times or require re-authentication in the middle of the session.

    To avoid having to make changes with each RETS server upgrade, we opted to use "RETS Connector" to bulk download MLS data in the background (no ColdFusion thread required) to CSV format and then use BULK INSERT to import the data directly into a SQL database.

    http://www.retsconnector.com/

    Alan_Koenig_920
    Known Participant
    August 11, 2015

    Thank you.  We have looked at this option and may use it for the public area.   We need to do analysis of different properties that seem fairly problematic using retsconnector.  How did you solve your MLS's version of photos?  Ours seems like it will be fun in figuring out.   Any help is always welcome.

    Alan

    Inspiring
    August 11, 2015

    What difficulties are you having? What errors are you getting? What have you tried?

    This is a very unique case / setup so you will need a little bit more information to go on before anyone can help.

    Alan_Koenig_920
    Known Participant
    August 11, 2015

    <cfhttp

      url="http://matrixrets.hicentralmls.com/rets/action.ashx"

      method="get"

      firstrowasheaders="yes"

      username="AlankoeniG"

      password="wW9C3hgs"

      result="test">

    </cfhttp>

    <cfoutput >

      #test#

    </cfoutput>

    Result

    Complex object types cannot be converted to simple values.

    The expression has requested a variable or an intermediate expression result as a simple value. However, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values.

    The most likely cause of the error is that you tried to use a complex value as a simple one. For example, you tried to use a query variable in a cfif tag.

    The error occurred in D:/home/manpcs.com/wwwroot/retstest.cfm: line 23
    21 : 22 : <cfoutput > 23 : #test# 24 : </cfoutput>
    James Moberg
    Inspiring
    August 12, 2015

    I am using CF 11. 

    I thought I had changed that.  Thank you for pointing i out.  I have already requested new credentials.

    This is my new error.

    struct

    Charset [empty string]

    ErrorDetail [empty string]

    Filecontent <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <title>401 - Unauthorized: Access is denied due to invalid credentials.</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;} fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC0000;} h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} #header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF; background-color:#555555;} #content{margin:0 0 0 2%;position:relative;} .content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} --> </style> </head> <body> <div id="header"><h1>Server Error</h1></div> <div id="content"> <div class="content-container"><fieldset> <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2> <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3> </fieldset></div> </div> </body> </html>

    Header HTTP/1.1 401 Unauthorized Access Denied Cache-Control: no-cache Cache-control: no-cache="set-cookie" Content-Type: text/html Date: Wed, 12 Aug 2015 00:00:07 GMT Expires: -1 Pragma: no-cache RETS-Version: RETS/1.7.2 Server: Microsoft-IIS/7.5 Set-Cookie: AWSELB=6D3DA3DA84958100DCC437817DEE0165DD22D26653118C1A244BAB4B589AC8DF9BCA064111E7535E94C84FA551FB7E15452C4223519328157171B00828F20C06F506B964;PATH=/;MAX-AGE=86400 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Content-Length: 1293 Connection: Close

    Mimetype text/html

    Responseheader

    struct

    Cache-control

    struct

    1 no-cache

    2 no-cache="set-cookie"

    Connection Close

    Content-Length 1293

    Content-Type text/html

    Date Wed, 12 Aug 2015 00:00:07 GMT

    Expires -1

    Explanation Unauthorized Access Denied

    Http_Version HTTP/1.1

    Pragma no-cache

    RETS-Version RETS/1.7.2

    Server Microsoft-IIS/7.5

    Set-Cookie AWSELB=6D3DA3DA84958100DCC437817DEE0165DD22D26653118C1A244BAB4B589AC8DF9BCA064111E7535E94C84FA551FB7E15452C4223519328157171B00828F20C06F506B964;PATH=/;MAX-AGE=86400

    Status_Code 401

    X-AspNet-Version 4.0.30319

    X-Powered-By ASP.NET

    Statuscode 401 Unauthorized Access Denied

    Text YES


    You'll have to use SOAP and post XML.  (The RETS Web Services components used by RETS2 are SOAP 1.2, WSDL 1.1 ,XML 1.0 and XML Schema.)

    Review the RETS specs here:

    http://www.reso.org/specifications

    The RETS PDF located here has XML samples:

    https://reso.memberclicks.net/assets/RETS/Specifications/rets2_service_final.zip