Integrating Google Checkout With WebObjects

Written on February 8, 2007 at 11:04 pm
Category: cocoa

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] <workerthread7> <wohttpio>: Unable to set socket timeout:Socket is closed  

Turns out that by calling

1 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

1 InputSource(new

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.