02.08.07
Integrating Google Checkout With WebObjects
I’ve been spending days on this. I kept getting messages that the socket to the app was being closed, and I couldn’t find out why.
[2007-02-08 14:13:40 PST]
: Unable to set socket timeout:Socket is closed
Turns out that by calling
com.google.checkout.sample.protocol.CallBackParser.getInstance().parseToJAXB(new InputSource(aRequest.contentInputStream()))
either jaxb, the xml parser, or the google code was closing the input stream returned by the request, which was closing the socket to the web server. Instead, I changed the code to
com.google.checkout.sample.protocol.CallBackParser.getInstance().parseToJAXB(new InputSource(new java.io.StringReader(aRequest.contentString())))
and it works fine.
I figured I’d post this note so that if someone else runs into this problem, they’d hopefully find a solution via a Google search.



Andrew Torrez said,
March 5, 2007 at 3:18 pm
Mark,
Just stumbled across your blog — it’s always nice to see a familiar face back from the GWUGS days. Hope all is well, and feel free to email me any time.
take care,
-Andrew