document classification using a J2EE product : Dspace
Dspace is a product jointly developed by MIT Library and HP. It is a J2EE product that is capable of creating a digitally durable repositor and classification of documents can be done using it.
But it is not a web service, in terms of the technologies it uses J2EE and third parties like  postGRESql, tomcat and ant.