Integration between two web applications electronically

I need to design a module in Java for exchanging information between two web applications. I have been researching online on the methods available and came across Web Services, XML, Text and EDI. Looking towards the future, what will be most appropriate?
