Author: darran.lofthouse(a)jboss.com
Date: 2006-10-16 11:33:10 -0400 (Mon, 16 Oct 2006)
New Revision: 1230
Modified:
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java
Log:
JBWS-1133 - Prototype code.
Modified:
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java
===================================================================
---
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java 2006-10-16
15:32:34 UTC (rev 1229)
+++
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java 2006-10-16
15:33:10 UTC (rev 1230)
@@ -97,6 +97,8 @@
if (webXML.isFile() == false)
throw new WSException("Cannot find web.xml: " + webXML);
+ File newWebXML = new File(warURL.getFile() +
"/WEB-INF/web.xml.jbossws");
+
try
{
Element root = DOMUtils.parse(new FileInputStream(webXML));
@@ -105,14 +107,16 @@
Map<String, String> sepTargetMap = modifyServletConfig(root, warName);
// After redeployment there might be a stale copy of the original
web.xml.org,
we delete it
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- orgWebXML.delete();
-
+ /*File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();*/
+ newWebXML.delete();
+
// Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WSException("Cannot rename web.xml: " + orgWebXML);
+ /*if (webXML.renameTo(orgWebXML) == false)
+ throw new WSException("Cannot rename web.xml: " + orgWebXML);*/
- FileOutputStream fos = new FileOutputStream(webXML);
+ log.info("New Web XML " + newWebXML.getAbsolutePath());
+ FileOutputStream fos = new FileOutputStream(newWebXML);
new DOMWriter(fos).setPrettyprint(true).print(root);
fos.close();
Modified:
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java
===================================================================
---
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java 2006-10-16
15:32:34 UTC (rev 1229)
+++
branches/dlofthouse/JBWS-1133/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java 2006-10-16
15:33:10 UTC (rev 1230)
@@ -23,6 +23,7 @@
// $Id: WebServiceDeployerJSE.java 377 2006-05-18 13:57:29Z thomas.diesler(a)jboss.com $
+import java.io.File;
import java.net.URL;
import java.util.Iterator;
import java.util.Map;
@@ -87,6 +88,10 @@
{
ServiceEndpointPublisher endpointPublisher = getServiceEndpointPublisher();
Map<String, String> sepTargetMap =
endpointPublisher.rewriteWebXML(udi.localUrl);
+
+ File newWebXML = new File(udi.localUrl.getFile() +
"/WEB-INF/web.xml.jbossws");
+ ((WebMetaData)di.metaData).setAltDD(newWebXML.getAbsolutePath());
+
updateServiceEndpointTargetBeans(udi, sepTargetMap);
}
return retn;