One caveat that I would like to provide to the Web Service layer that wants to use the schema capabilities provided by tools is the following:
The Web Services layer needs to modify the schema model after it has been written to a file. So tools, when parses the schema file, uses Xerces based implementation, which flattens the schema model. But once the Xerces based XSModel is built, it cannot be modified (like adding new Elements, Attributes etc).
Since the WS layer is requesting access to schema API to be provided so that changes can be made to the schema model, I want to tell that underneath, JBossWS tools has to copy over the Xerces Schema Model "XSModel" into JBoss implementation of XSModel called "JBossXSModelImpl", on which you can do any kind of schema manipulation.
The reason this anomaly exists is because the Xerces implementation is good for parsing schema model from a schema file, but they discourage us from using their implementation to manipulate or create schema model.
On the other hand, there is a util class called "SchemaUtils" that provides a lot of features like schema creation, addition of global elements etc. This util class will be updated to serve the WS layer with JIRA issues like JBWS-204 mentioned above.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3879278#3879278
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3879278