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 11, 2015

    NOTE: If you posted your RETS credentials in your post, you may want to remove them... or request that the provider change them now that you've posted it.

    Use <CFDump variable="#test#"> when outputting the "test" variable so that you can identify what is being returned.  (Also, the response returned is not a CSV table.)

    Which version of ColdFusion are you using? (ie, If HTTPS is required, there's a chance that ColdFusion 9 won't be able to connect. There may be other issues too.)

    Depending on what you are attempting to access, you may require additional privileges.  We initially had to negotiate to get open house data.  Some property statuses and agent-only data may not be available either.

    Regarding photos, we have a task in RETS Connector that downloads modified photos since the time the task last ran.  We use a command line tool to rename the JPG files (since ColdFusion's file system is really slow by comparison & timing out.)  We have other scripts that optimize & move the photos to a production directory based on partial MLS name (so that they aren't all in the same sub-directory.)  This method was better than hoping that the RETS script-based photo URLs were responsive and performant.