The Connections Java API docs and examples make assumptions the user is using a Web server to interact with Connections. In my case, I want to use the Java API using jRuby and there is no web server.
I want to upload a file to a Connections community, or more specifically connect to the Connections server directly, authenticate and do the upload. I tried the following code and hit a wall with the error:
"SBT context is not initialized for the request"
This error message seems to be complaining about a servlet which of course I don't have.
Here is the code I tried...
ep = new BasicEndpoint();
ep.setUrl(connections_url);
ep.login(userid, pw);
service = new CommunityService();
service.setEndpoint(ep);
istream = new FileInputStream(temp_file);
uploaded_file = service.uploadFile(istream, community_id, filename, filesize)
The API calls used above are just a guess on my part however the login to the Endpoint seems to work as the method returns true and that gave me some hope I was on the right track. But the upload failed with the context error so now I'm stuck.
Any ideas to make this work?