1

I am using a JSP site to retrieve the MLS data from the MRIS RETS using RETSIQ

It was working fine still 31 March 2015. And now its not retrieving data from the RETS server.

The error message I get is,

com.bigllc.retsiq.simpleclient.RETSClientException: Search request failed - HTTP server returned with code 500

This occures when the line,

retsSession.search(path, query, null, 1, 0, handler);

is executed

siva prasanna
  • 143
  • 1
  • 1
  • 10

2 Answers2

0

When you capture the response stream, and save it to a file or view it in a browser, you would likely find that you are getting an HTTP 500 Server Error page, and further it would tell you that you were doing something they claim is "Cookie Poisoning."

That error page includes an email address where you can contact their RETS Technical Support, and I suggest you do so immediately.

The issue comes down to how the Apache HttpClient 3.x handles cookies. retsIQ uses the 3.x version, and the default is to be RFC 2109 compliant - which is consistent with the RETS specification since 1.7.

MRIS is not RFC 2109 compliant. In talking with their support, they quote RFC 6265, which is the most recent RFC on Cookies. However, RETS 1.7 to 1.8 is very clear "The client MUST implement cookie handling as specified in RFC 2109." To make matters worse, they see RFC 2109 compliance as cookie poisoning.

Your dilemma is that retsIQ hides the API you need to modify the CookiePolicy to either CoookiePolicy.NETSCAPE or CookiePolicy.BROWSER_COMPATIBILITY.

You have three choices (in order of feasibility and your ability to control the outcome):

  1. Alter your application to use libRETS.
  2. Use reflection to intercept/modify the HttpState of the HttpClient to modify the CookiePolicy.
  3. Wait for MRIS to stop claiming RFC 2109 compliant cookies are malformed.
rbellamy
  • 5,683
  • 6
  • 38
  • 48
  • I dont understand what you mean by Use reflection to intercept/modify the HttpState of the HttpClient to modify the CookiePolicy. – siva prasanna Apr 06 '15 at 17:19
  • Anyways thanks for your reply. Just like to know what can I do now. – siva prasanna Apr 06 '15 at 17:21
  • @sivaprasanna, you can use reflection to intercept the method call or to access what otherwise would be a private member. Check out this answer: http://stackoverflow.com/questions/1196192/how-do-i-read-a-private-field-in-java – rbellamy Apr 06 '15 at 23:44
  • Do you know what change must be done with the cookie. Have you worked on that before and do you have any working sample code.Thanks. – siva prasanna Apr 07 '15 at 12:34
  • @sivaprasanna it's pretty clear to me that you should look closely at libRETS. It has JAVA bindings, and as it uses cURL for its HTTP handling, it won't be suffering from the problems you face with retsIQ. I already showed you the two HttpClient 3.x `CookiePolicy` values that I know work. Using reflection to intercept/modify the calls internal to retsIQ is a complex and error-prone process, and you're more likely to be successful with it through trial and error, than me trying to walk you through it here. Have you tried contacting Bridge Interactive (the authors of retsIQ)? – rbellamy Apr 07 '15 at 18:58
  • The retsIQ are not providing any reply regarding this issue. if possible can you send me a sample code of libRETS in java (I searched and found only c++ libraries.)My mail id k.siva1992@gmail.com. Thank you. – siva prasanna Apr 08 '15 at 06:08
  • @sivaprasanna The libRETS Developers Quick Start (http://nationalassociationofrealtors.github.io/libRETS/documentation/devguide/) documentation includes sample code for each of the various swig bindings (ruby, python, C#, java, etc). – rbellamy Apr 11 '15 at 22:10
  • Thank you very much for your time and help. I contacted the MRIS support again and the replied me saying that there was an issue in their library before and they now solved it. – siva prasanna Apr 13 '15 at 05:11
0

Thank you everyone for your reply and support.

The problem is solved by the MRIS support people itself.

The problem was in their server not accepting the RETSIQ library and now they have fixed it.

siva prasanna
  • 143
  • 1
  • 1
  • 10