The Java Tutorial - Introduction to Web Services
I also recommend to buy a book on Java EE.
I'm reactivating this as the expert didn't come around with a solution on how to connect 2 Java clients. Also doesn't it seem like he's sending 200$ for the questioner to buy the IDE and rewrite his code in Adobe Flex.
It can be done as a basic Java EE task. Please check the tutorial on how to create a webservice and how to connect your clients.