[jboss-cvs] JBossAS SVN: r68726 - branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 9 05:37:47 EST 2008


Author: thomas.diesler at jboss.com
Date: 2008-01-09 05:37:47 -0500 (Wed, 09 Jan 2008)
New Revision: 68726

Modified:
   branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
Log:
Rollback: [JBWS-1797] / [JBWS-1858] Reading jbossws configuration from web.xml

Modified: branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
===================================================================
--- branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java	2008-01-09 08:22:06 UTC (rev 68725)
+++ branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java	2008-01-09 10:37:47 UTC (rev 68726)
@@ -23,23 +23,19 @@
 
 // $Id: ContainerMetaDataAdapter.java 4022 2007-07-27 13:54:43Z heiko.braun at jboss.com $
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
 import org.jboss.deployment.DeploymentInfo;
 import org.jboss.logging.Logger;
 import org.jboss.metadata.ApplicationMetaData;
 import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.common.DOMUtils;
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
 import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
 import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.w3c.dom.Element;
 
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
 /**
  * Build container independent deployment info. 
  *
@@ -78,38 +74,10 @@
       if (di.metaData instanceof WebMetaData)
       {
          JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildUnifiedWebMetaData(dep, di);
-         URL webAppURL = getDeploymentURL(di);
          if (webMetaData != null)
-         {
             dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
-            if (webMetaData.getConfigName() == null && webMetaData.getConfigFile() == null)
-            {
-               //[JBWS-1797] hack for reading eventual custom configuration from web.xml
-               File file = new File(webAppURL.getFile() + "/WEB-INF/web.xml");
-               try
-               {
-                  Element webApp = DOMUtils.parse(new FileInputStream(file));
-                  for (Element contextParam : DOMUtils.getChildElementsAsList(webApp, "context-param"))
-                  {
-                     String paramName = ((Element)DOMUtils.getChildElements(contextParam, "param-name").next()).getTextContent();
-                     String paramValue = ((Element)DOMUtils.getChildElements(contextParam, "param-value").next()).getTextContent();
-                     if ("jbossws-config-name".equals(paramName))
-                     {
-                        webMetaData.setConfigName(paramValue);
-                     }
-                     if ("jbossws-config-file".equals(paramName))
-                     {
-                        webMetaData.setConfigFile(paramValue);
-                     }
-                  }
-               }
-               catch (IOException e)
-               {
-                  log.warn("Error while getting jbossws configuration from web.xml, ignoring eventual custom configuration.");
-               }
-            }
-         }
-         dep.setProperty("org.jboss.ws.webapp.url", webAppURL);
+         
+         dep.setProperty("org.jboss.ws.webapp.url", getDeploymentURL(di));
       }
       else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() == DeploymentType.JAXWS_EJB3)
       {




More information about the jboss-cvs-commits mailing list