4 Replies Latest reply on Jun 5, 2008 7:30 PM by thomas.diesler



      Hi folks,

      long time since my last post here ;) How are you?
      I'm fine, and I'm now involved t some level in JBoss DNA development. There we need to parse wsdls to extract metadata and store them in a JSR-170 repository to analyse and query them: http://jira.jboss.org/jira/browse/DNA-33
      I took a look to org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder in native stack, and it seems to do all I need. I have just a trouble with it since it use a URL pointing to wsdl location which is passed to ServiceMetaData and finally to WSDLDefinitionsFactory where you open an InputStream of this URL.
      Well I have an InputStream directly from JCR and I would ask if you can see some problem adding a set of methods working directly with inputStream, adding them at current classes.
      Of course, if you agree, I can manage myself the task opening a Jira Issue and committing changes on a branch.
      Do you have any problem with this idea? Am I wrong in some part?

      thanks a lot

        • 1. Re: JAXWSClientMetaDataBuilder

          Hi Stefano,
          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.

          • 2. Re: JAXWSClientMetaDataBuilder

            There is standard access to the generated wsdl via MessageContext.WSDL_DESCRIPTION

            This is related http://jira.jboss.org/jira/browse/JBWS-2013

            • 3. Re: JAXWSClientMetaDataBuilder

              Hi Thomas,
              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?

              • 4. Re: JAXWSClientMetaDataBuilder

                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.