I was trying to connect to quickbooks online from google app engine by just running this simple code:
OAuthCredentials oauthcredentials = new OAuthCredentials(co
AppEngine provides only a limited Socket API. In particular, you cannot use most getsockopt
/setsockopt
calls, which in your case throw the error (setTcpNoDelay(..)
).
QuickBooks SDK seems to be closed-source, so there is no way around it.
Update:
As of GAE Java SDK 1.8.1., it's possible to use socket options methods: they are a no-op, but they do not throw exceptions as they used to:
The Sockets API now allows client code to call get/set options against sockets. Previously, calls raised "Not Implemented" exceptions. When java.net.Socket.get<option>() is called, a mock value is returned, calls to set<option>() will be silently ignored.
I am SO thankful that you posted this question. I had been banging my head against the wall for days with the same problem, except I am developing my Google App in the Go language, not Java. BUT I MADE IT WORK! I hope that my solution will help you also. Basically, instead of using the sockets service, I am using the URL Fetch service, documented for Java here: https://developers.google.com/appengine/docs/java/urlfetch/
I am pretty clueless about some of the details in your original post (I have not developed in Java, and am not familiar with the QBServiceFactory nor the OAuthCredentials). So I am not sure how much control you have over how it actually sends the requests to QB. But worst case scenario, I think you may be able to write your own functions to replace the QBServiceFactory (which I have had to do in Go), and if you make sure they use the URL Fetch service instead of sockets, you may have better luck.
As I said, I am very thankful for your question, because I do not think that I would have stumbled across my answer otherwise, so thank you!