my only concern right now is whether the org.jboss.ws.metadata.umdm metadata is really what you want to save in the repository. Those metadata might be too jbossws-native specific. Are the org.jboss.ws.metadata.wsdl metadata enough for you instead? You can easily get them through org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory which of course you might want to extend to use a pre-existing input stream.
probably my explanation is too brief and a little bad.
My use case has no relation with soap message, so (I think) it has no opportunities to read something from the context.
What DNA would basically do, is to read a wsdl from some sources (often from uddi), and store this wsdl in a JCR. Then (potentially at different time), reading it and parse it to extract metadata and store them too in JCR.
I think I have to use some wsdl parser to extract these metadatas from the xml. Am I wrong?
In fact Alessio seems to be right, I would need just wsdl metadata instead of umdm, so I would have to modify org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory to parse wsdl directly by an InputStream.
Am I misunderstanding you?
The problem with InputStream is, that it cannot deal with with relative imports. So your wsdl cannot reference other wsdls nor external xsd files.
You could also use the wsld4j API directly.