How to develop / build a document style web service using JAVA ?