Best way to register a new Drupal user via a 3rd party application We have a Java application on our server, when users provide their email and username to it I want it to send the username and email to our Drupal site to register them for an account. And I'd like them to still receive Drupal's welcome email containing their password.

What's the best way to achieve this, I was thinking possibly the services module? But wasn't sure if there'd be a better solution because the Java code and Drupal site are on the same server and therefore we could have some pretty direct integration.
I may be biased b/c I am the Services module maintainer, but, You don't want to be directly inserting things into the database.

You could REALLY break Drupal by doing this.

If you didn't want to use services module(which why wouldn't you?) you should really use Drupal's apis to put things in the database, like, node_save, or drupal_form_submit(which is what services does).

This ensures that Drupal actually enters the data and will lead to a cleaner overall integration with less problems.

In Drupal 6.x this json actually creates a user when POSTed to SERVER/ENDPOINT/user.

{"uid":"1","name":"admin","pass":"1a1dc91c907325c69271ddf0c944bc72","mail":"kyle@workhabit.com","mode":"0","sort":"0","threshold":"0","theme":"","signature":"","signature_format":"0","created":"1286571725","access":"1294792121","login":"1293782855","status":"1","timezone":null,"language":"","picture":"","init":"kyle@workhabit.com","data":"a:0:{}","roles":{"2":"authenticated user"}}