|
From: Frank K. <fku...@to...> - 2004-11-08 20:25:29
|
Hi Dave,
Thanks for all your great help.
Frank
On Mon, 2004-11-08 at 10:52, Dave Dribin wrote:
> On Nov 6, 2004, at 4:51 PM, Frank Kurzawa wrote:
> > 1. SAXParseException: The entity name must immediately follow the '&'
> > in the entity reference.
> > Some MLS listings end up with ampersands in their data, e.g. in the
> > property description. Unfortunately, SAX just throws up over these.
>
> This is bad... really bad.
That reflects my initial sentiment as well. But since the Avantia client
didn't have a problem with this, I I've been willing to entertain the
idea that perhaps the problem was me. LOL
> > I've not much experience with tweaking SAX, but the only obvious way
> > that I
> > see to deal with this is to modify the characters() method in the
> > SearchResultHandler to escape any ampersands in the <DATA> content.
>
> 'Tis too late by the point characters() is called, I imagine.
I'm not too sure that it's too late: I was able to put debug statements
in the characters routine and display the content. So SAX had not thrown
up yet. I think since the ampersand is in the content rather than the
tag, SAX hasn't looked very closely at it yet. (just speculating...)
> > Is there a better approach?
>
> The best method is to yell at your MLS. The SAX parsers I've seen are
> not that lenient on XML (and they shouldn't be). AFAIK, there's no SAX
> compliant XML parser that will allow ampersands to be legal. You see,
> software outside of real estate tend to follow their specifications. :)
> A SAX parser wouldn't be an XML parser if it allowed ampersands.
>
> I suppose one way around this is to wrap the XML input stream and
> replace ampersands *before* it gets to the XML parser, thus making sure
> the data is XML before it hits SAX. But as this has got to be a
> performance hit, I'd say this is not something that RETS client should
> do by default, if at all.
>
> > 2. client.LogoutResponse - Invalid logout response key: Logged Out ->
> > <null>
> > a. Actually, I couldn't even get this output until I first modified
> > KeyValueResponse.HandleRetsResponse(). The method assumes that the
> > RetsResponse Element actually has a "=" in the content. If the "=" is
> > missing then a catastrophic null pointer exception occurs.
> > I fixed this by modifying the HandleRetsResponse() method to substitute
> > the string "<null>" if there is no equals.
>
> Just so I know exactly what you are talking about, what is the full
> response you are getting from your server here (cut and paste it, if
> you can)?
>
0000 00 0a e6 80 6e 5c 00 0c 41 7b e3 ce 08 00 45 00 ....n\..A{....E.
0010 00 82 c1 b1 40 00 6f 06 f3 38 41 53 53 30 c0 a8 ....@.o..8ASS0..
0020 01 60 00 50 81 c7 00 84 87 32 20 d3 55 05 80 19 .`.P.....2 .U...
0030 ff 37 e6 55 00 00 01 01 08 0a 00 06 b7 e6 00 05 .7.U............
0040 67 f7 3c 52 45 54 53 20 52 65 70 6c 79 43 6f 64 g.<RETS ReplyCod
0050 65 3d 22 30 22 20 52 65 70 6c 79 54 65 78 74 3d e="0" ReplyText=
0060 22 4f 70 65 72 61 74 69 6f 6e 20 53 75 63 63 65 "Operation Succe
0070 73 73 66 75 6c 22 3e 0d 0a 4c 6f 67 67 65 64 20 ssful">..Logged
0080 4f 75 74 0d 0a 3c 2f 52 45 54 53 3e 0d 0a 0d 0a Out..</RETS>....
0090
> > b. Beyond that, if the server returns anything other than
> > "ConnectTime", "Billing", or "SignOffMessage", then
> > LogoutResponse.handleKeyValue() chooses to fail catastrophically, which
> > locks CART out of the ability to work with some RETS servers.
> > I handled this by modifying the handleKeyValue() method to simply log
> > an
> > error in this situation.
>
> The stuff I checked in Friday should handle this.
>
> > Are my chosen modifications the best way to handle these issues? I'm
> > starting to feel like I need to continually tweak rets-client every
> > time
> > I work with another (non-compliant) RETS server out there.
>
> Okay... which RETS server are you using? They are terribly sloppy, and
> should not be allowed to use the word "RETS" when describing their
> product.
>
> -Dave
>
>
>
> --
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Cart-users mailing list
> Car...@li...
> https://lists.sourceforge.net/lists/listinfo/cart-users
--
Frank Kurzawa <fku...@to...>
Topaz Software, Inc.
|