Hi!
I am not sure I have understand your requirements correctly, but here are some suggestions:
You can write a Document/Literal web service that accepts any XML fragment. This enables you to add support for new document types without changing the interface of the web service.
Depending on how you want to process the data in the web service, you can choose between the following options:
1. Use JAXB to automatically bind the XML data to
Java objects.
Use SAX or something to find the namespace of the document received and create the appropriate JAXB unmarshaller based on the namespace.
2. Implement your own parsing for each document.
Again, use SAX or something similar to find the namespace of the received document and create the appropriate parser accordingly.
Additionally, if you need to support different kinds of operations on the data, then provide corresponding operations in the web service. Such operations can also take any XML document as parameter.
Best wishes!