I have a couple of programs written in Java that calculate and format sailboat race results. I'd like to post those results, automatically, to a Drupal website.

In my pre-Drupal days, I'd just ftp them to the site and call it a day, but now I want to create a node.

In googling around, it is appearing that xmlrpc is the right way to go, but it looks sort of like a steep learning curve, so I wanted to solicit the views of you fine folks before proceeding.

What's a good, efficient way to let my desktop Java program talk to Drupal on the server?

Thanks!

Comments

briansea’s picture

I have just recently had cause to do something quite similar. I opted to not use xml-rpc, but instead just post to a url handled by a module I wrote. Then, in the page callback function, create your node, do whatever, print a status code so the java program know it went well or not, (yes using print ), then call exit(); Unlike usual, the page callback will not return anything. Hope this helps.

papile’s picture

People these days are not using XMLRPC as much anymore. Id look into making a REST server and just transmit json back and forth. With REST you can just call something like myserver.com/results/today.json The server can transmit http codes to indicate success and failure. So if the records were not found you would get a 404 error, if it was success you get 200 response with your data. It is good for things like this.