Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2332 Review and fix JBossWS integration with JBoss AS 5x
  3. JBWS-2333

Refactor ArchiveDeployerHook.getWebservicesMetaData() to Separate Deployer

XMLWordPrintable

      We do the following in <b>org.jboss.wsf.container.jboss50.deployer.ArchiveDeployerHook.getWebservicesMetaData(DeploymentUnit unit)</b>

      <pre>
      /** Unmrashall the webservices.xml if there is one
      */
      protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
      {
      WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
      UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
      if (wsMetaData == null && vfWebservices != null)
      {
      try
      {
      URL wsURL = vfWebservices.toURL();
      Element root = DOMUtils.parse(wsURL.openStream());
      String namespaceURI = root.getNamespaceURI();
      if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))

      { Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller(); ObjectModelFactory factory = new WebservicesFactory(wsURL); wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null); unit.addAttachment(WebservicesMetaData.class, wsMetaData); }

      }
      catch (Exception ex)

      { throw new WSFDeploymentException(ex); }

      }
      return wsMetaData;
      }
      </pre>

      It integrates with deployers improperly. This method should be refactored to separate deployer that does this translation job from webservices.xml -> WebservicesMetaData class

              ropalka Richard Opalka
              ropalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: