"A" way although definitely not "the" way would be to encrypt all messages using XML Encryption (http://www.w3.org/TR/xmlenc-core/).
A few reasons this seems like a good idea:
- Old/reliable Java libraries widely available.
- Works at the application layer: easy to understand, debug and unit-test.
- No need for network admin work as with VPN.
- No need for server admin work as with SSL.
- Published encryption schemes are always far better than any proprietary solution you might try to come up with on your own.
Of course, if you're going to take the leap into XML you might as well go the extra step to a Web Service as the other answerer suggested - but that comes at the cost of additional layers and more configuration.
My answer assumes this is a one-person project... In an enterprise environment you should actually push for separation of authority and adding more security layers than minimally necessary.