JBossWS SVN: r4622 - container/jboss42/branches/ropalka/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-25 06:22:51 -0400 (Tue, 25 Sep 2007)
New Revision: 4622
Added:
container/jboss42/branches/ropalka/trunk/mergeinfo.txt
Log:
adding merge information file to my branch
Added: container/jboss42/branches/ropalka/trunk/mergeinfo.txt
===================================================================
--- container/jboss42/branches/ropalka/trunk/mergeinfo.txt (rev 0)
+++ container/jboss42/branches/ropalka/trunk/mergeinfo.txt 2007-09-25 10:22:51 UTC (rev 4622)
@@ -0,0 +1 @@
+svn merge -r4619:4620 https://svn.jboss.org/repos/jbossws/container/jboss42/branches/ropalka/trunk
Property changes on: container/jboss42/branches/ropalka/trunk/mergeinfo.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 3 months
JBossWS SVN: r4621 - container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-25 06:19:14 -0400 (Tue, 25 Sep 2007)
New Revision: 4621
Modified:
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
Log:
[JBWS-1762] fix of the issue for jboss42 integration layer - merge to trunk
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -21,6 +21,16 @@
*/
package org.jboss.wsf.container.jboss42;
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
@@ -60,4 +70,38 @@
return servletName;
}
}
+
+ // JBWS 1762
+ Map<String, String> getServletClassMap(URL resource)
+ {
+ if (resource == null)
+ return null;
+
+ File origWebXml = new File(resource.getFile());
+ if (origWebXml.isDirectory())
+ return null;
+
+ Map<String, String> retVal = new HashMap<String, String>();
+ try
+ {
+ FileInputStream source = new FileInputStream(origWebXml);
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+ Element root = document.getRootElement();
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String servletName = servlet.element("servlet-name").getTextTrim();
+ Element servletClass = servlet.element("servlet-class");
+ retVal.put(servletName, servletClass == null ? null : servletClass.getTextTrim());
+ }
+ }
+ catch (Exception ignore)
+ {
+ return null;
+ }
+
+ return retVal.size() > 0 ? retVal : null;
+ }
+
}
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -87,7 +87,7 @@
if (servletLink == null)
throw new IllegalStateException("servlet-link cannot be null");
- Servlet servlet = getServletForName(webMetaData, servletLink);
+ Servlet servlet = getServletForName(webMetaData, di.annotationsCl, servletLink, dep);
String servletClass = servlet.getServletClass();
try
@@ -114,9 +114,22 @@
return dep;
}
- private Servlet getServletForName(WebMetaData wmd, String servletLink)
+ private Servlet getServletForName(WebMetaData wmd, ClassLoader loader, String servletLink, Deployment dep)
{
- Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ // JBWS 1762
+ Map servletClassMap = getServletClassMap(loader.getResource("WEB-INF/web.xml.org"));
+
+ if (servletClassMap != null)
+ {
+ if (dep != null)
+ dep.setProperty("org.jboss.ws.webapp.modify", "false");
+ }
+ else
+ {
+ servletClassMap = wmd.getServletClassMap();
+ }
+
+ Iterator it = servletClassMap.entrySet().iterator();
while (it.hasNext())
{
Map.Entry entry = (Entry)it.next();
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -73,7 +73,7 @@
// Copy the attachments
dep.addAttachment(WebMetaData.class, webMetaData);
- List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
+ List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl, dep);
for (Servlet servlet : servlets)
{
String servletName = servlet.getServletName();
@@ -98,7 +98,7 @@
try
{
WebMetaData webMetaData = (WebMetaData)unit.metaData;
- List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+ List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl, null);
isWebServiceDeployment = servlets.size() > 0;
}
catch (Exception ex)
@@ -108,11 +108,24 @@
return isWebServiceDeployment;
}
+
+ private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader, Deployment dep)
+ {
+ // JBWS 1762
+ Map servletClassMap = getServletClassMap(loader.getResource("WEB-INF/web.xml.org"));
+
+ if (servletClassMap != null)
+ {
+ if (dep != null)
+ dep.setProperty("org.jboss.ws.webapp.modify", "false");
+ }
+ else
+ {
+ servletClassMap = webMetaData.getServletClassMap();
+ }
- private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
- {
List<Servlet> servlets = new ArrayList<Servlet>();
- Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+ Iterator it = servletClassMap.entrySet().iterator();
while (it.hasNext())
{
Map.Entry entry = (Entry)it.next();
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -23,12 +23,6 @@
//$Id: ModifyWebMetaDataDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-import java.io.File;
-import java.io.FileInputStream;
-import java.net.URL;
-
-import javax.xml.ws.WebServiceException;
-
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -51,7 +45,7 @@
public void create(Deployment dep)
{
RewriteResults results = webXMLRewriter.rewriteWebXml(dep);
-
+
// The endpoint may not have a target bean when
// <servlet-class> originally contained a javax.servlet.Servlet
for (Endpoint ep : dep.getService().getEndpoints())
@@ -68,35 +62,4 @@
}
}
- public void destroy(Deployment dep)
- {
- URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
- File warFile = new File(warURL.getFile());
- if (warFile.isDirectory() == false)
- throw new WebServiceException("Expected a war directory: " + warURL);
-
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
- if (webXML.isFile() == false)
- throw new WebServiceException("Cannot find web.xml: " + webXML);
-
- try
- {
- // On destroy remove the modified web.xml and rollback web.xml.org to web.xml
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- webXML.delete();
-
- // Rename the web.xml.org
- if (orgWebXML.renameTo(webXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- }
-
}
\ No newline at end of file
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -64,6 +64,8 @@
log.debug("publishServiceEndpoint: " + warURL);
try
{
+ // JBWS 1762
+ dep.setProperty("org.jboss.ws.webapp.descriptor.suffix", ".ejb.org");
webXMLRewriter.rewriteWebXml(dep);
DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
Modified: container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
===================================================================
--- container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java 2007-09-25 10:03:43 UTC (rev 4620)
+++ container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java 2007-09-25 10:19:14 UTC (rev 4621)
@@ -75,15 +75,24 @@
try
{
- // 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();
+ FileInputStream stream = new FileInputStream(webXML);
+ String modifyProperty = (String)dep.getProperty("org.jboss.ws.webapp.modify");
+
+ // JBWS 1762
+ if ((modifyProperty == null) || (!modifyProperty.equals("false")))
+ {
+ String suffix = (String)dep.getProperty("org.jboss.ws.webapp.descriptor.suffix");
+ if (suffix == null)
+ suffix = ".org";
+ File orgWebXML = new File(webXML.getCanonicalPath() + suffix);
- // Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ stream = new FileInputStream(orgWebXML);
+ }
- FileInputStream stream = new FileInputStream(orgWebXML);
return rewriteWebXml(stream, webXML, dep);
}
catch (RuntimeException rte)
@@ -110,11 +119,15 @@
RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
results.webXML = destFile.toURL();
- FileOutputStream fos = new FileOutputStream(destFile);
- OutputFormat format = OutputFormat.createPrettyPrint();
- XMLWriter writer = new XMLWriter(fos, format);
- writer.write(document);
- writer.close();
+ String modifyProperty = (String)dep.getProperty("org.jboss.ws.webapp.modify");
+ if ((modifyProperty == null) || (!modifyProperty.equals("false")))
+ {
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+ }
return results;
}
17 years, 3 months
JBossWS SVN: r4620 - container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-09-25 06:03:43 -0400 (Tue, 25 Sep 2007)
New Revision: 4620
Modified:
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
Log:
[JBWS-1762] fix of the issue for jboss42 integration layer
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/AbstractDeployerHookJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -21,6 +21,16 @@
*/
package org.jboss.wsf.container.jboss42;
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
@@ -60,4 +70,38 @@
return servletName;
}
}
+
+ // JBWS 1762
+ Map<String, String> getServletClassMap(URL resource)
+ {
+ if (resource == null)
+ return null;
+
+ File origWebXml = new File(resource.getFile());
+ if (origWebXml.isDirectory())
+ return null;
+
+ Map<String, String> retVal = new HashMap<String, String>();
+ try
+ {
+ FileInputStream source = new FileInputStream(origWebXml);
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+ Element root = document.getRootElement();
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String servletName = servlet.element("servlet-name").getTextTrim();
+ Element servletClass = servlet.element("servlet-class");
+ retVal.put(servletName, servletClass == null ? null : servletClass.getTextTrim());
+ }
+ }
+ catch (Exception ignore)
+ {
+ return null;
+ }
+
+ return retVal.size() > 0 ? retVal : null;
+ }
+
}
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXRPCDeployerHookPreJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -87,7 +87,7 @@
if (servletLink == null)
throw new IllegalStateException("servlet-link cannot be null");
- Servlet servlet = getServletForName(webMetaData, servletLink);
+ Servlet servlet = getServletForName(webMetaData, di.annotationsCl, servletLink, dep);
String servletClass = servlet.getServletClass();
try
@@ -114,9 +114,22 @@
return dep;
}
- private Servlet getServletForName(WebMetaData wmd, String servletLink)
+ private Servlet getServletForName(WebMetaData wmd, ClassLoader loader, String servletLink, Deployment dep)
{
- Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ // JBWS 1762
+ Map servletClassMap = getServletClassMap(loader.getResource("WEB-INF/web.xml.org"));
+
+ if (servletClassMap != null)
+ {
+ if (dep != null)
+ dep.setProperty("org.jboss.ws.webapp.modify", "false");
+ }
+ else
+ {
+ servletClassMap = wmd.getServletClassMap();
+ }
+
+ Iterator it = servletClassMap.entrySet().iterator();
while (it.hasNext())
{
Map.Entry entry = (Entry)it.next();
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookPreJSE.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -73,7 +73,7 @@
// Copy the attachments
dep.addAttachment(WebMetaData.class, webMetaData);
- List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl);
+ List<Servlet> servlets = getRelevantServlets(webMetaData, di.annotationsCl, dep);
for (Servlet servlet : servlets)
{
String servletName = servlet.getServletName();
@@ -98,7 +98,7 @@
try
{
WebMetaData webMetaData = (WebMetaData)unit.metaData;
- List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+ List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl, null);
isWebServiceDeployment = servlets.size() > 0;
}
catch (Exception ex)
@@ -108,11 +108,24 @@
return isWebServiceDeployment;
}
+
+ private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader, Deployment dep)
+ {
+ // JBWS 1762
+ Map servletClassMap = getServletClassMap(loader.getResource("WEB-INF/web.xml.org"));
+
+ if (servletClassMap != null)
+ {
+ if (dep != null)
+ dep.setProperty("org.jboss.ws.webapp.modify", "false");
+ }
+ else
+ {
+ servletClassMap = webMetaData.getServletClassMap();
+ }
- private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
- {
List<Servlet> servlets = new ArrayList<Servlet>();
- Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+ Iterator it = servletClassMap.entrySet().iterator();
while (it.hasNext())
{
Map.Entry entry = (Entry)it.next();
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeploymentAspect.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -23,12 +23,6 @@
//$Id: ModifyWebMetaDataDeployer.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
-import java.io.File;
-import java.io.FileInputStream;
-import java.net.URL;
-
-import javax.xml.ws.WebServiceException;
-
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -51,7 +45,7 @@
public void create(Deployment dep)
{
RewriteResults results = webXMLRewriter.rewriteWebXml(dep);
-
+
// The endpoint may not have a target bean when
// <servlet-class> originally contained a javax.servlet.Servlet
for (Endpoint ep : dep.getService().getEndpoints())
@@ -68,35 +62,4 @@
}
}
- public void destroy(Deployment dep)
- {
- URL warURL = (URL)dep.getProperty("org.jboss.ws.webapp.url");
- File warFile = new File(warURL.getFile());
- if (warFile.isDirectory() == false)
- throw new WebServiceException("Expected a war directory: " + warURL);
-
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
- if (webXML.isFile() == false)
- throw new WebServiceException("Cannot find web.xml: " + webXML);
-
- try
- {
- // On destroy remove the modified web.xml and rollback web.xml.org to web.xml
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- webXML.delete();
-
- // Rename the web.xml.org
- if (orgWebXML.renameTo(webXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- }
-
}
\ No newline at end of file
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeploymentAspect.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -64,6 +64,8 @@
log.debug("publishServiceEndpoint: " + warURL);
try
{
+ // JBWS 1762
+ dep.setProperty("org.jboss.ws.webapp.descriptor.suffix", ".ejb.org");
webXMLRewriter.rewriteWebXml(dep);
DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
Modified: container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java
===================================================================
--- container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java 2007-09-25 09:46:52 UTC (rev 4619)
+++ container/jboss42/branches/ropalka/trunk/src/main/java/org/jboss/wsf/container/jboss42/WebXMLRewriterImpl.java 2007-09-25 10:03:43 UTC (rev 4620)
@@ -75,15 +75,24 @@
try
{
- // 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();
+ FileInputStream stream = new FileInputStream(webXML);
+ String modifyProperty = (String)dep.getProperty("org.jboss.ws.webapp.modify");
+
+ // JBWS 1762
+ if ((modifyProperty == null) || (!modifyProperty.equals("false")))
+ {
+ String suffix = (String)dep.getProperty("org.jboss.ws.webapp.descriptor.suffix");
+ if (suffix == null)
+ suffix = ".org";
+ File orgWebXML = new File(webXML.getCanonicalPath() + suffix);
- // Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ stream = new FileInputStream(orgWebXML);
+ }
- FileInputStream stream = new FileInputStream(orgWebXML);
return rewriteWebXml(stream, webXML, dep);
}
catch (RuntimeException rte)
@@ -110,11 +119,15 @@
RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
results.webXML = destFile.toURL();
- FileOutputStream fos = new FileOutputStream(destFile);
- OutputFormat format = OutputFormat.createPrettyPrint();
- XMLWriter writer = new XMLWriter(fos, format);
- writer.write(document);
- writer.close();
+ String modifyProperty = (String)dep.getProperty("org.jboss.ws.webapp.modify");
+ if ((modifyProperty == null) || (!modifyProperty.equals("false")))
+ {
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+ }
return results;
}
17 years, 3 months
JBossWS SVN: r4619 - stack/native/trunk/src/main/java/javax/jws/soap.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-09-25 05:46:52 -0400 (Tue, 25 Sep 2007)
New Revision: 4619
Modified:
stack/native/trunk/src/main/java/javax/jws/soap/InitParam.java
stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandler.java
stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandlers.java
Log:
JBCTS-309: javax.jws.soap signature tests
Modified: stack/native/trunk/src/main/java/javax/jws/soap/InitParam.java
===================================================================
--- stack/native/trunk/src/main/java/javax/jws/soap/InitParam.java 2007-09-25 09:15:08 UTC (rev 4618)
+++ stack/native/trunk/src/main/java/javax/jws/soap/InitParam.java 2007-09-25 09:46:52 UTC (rev 4619)
@@ -28,6 +28,7 @@
* @author thomas.diesler(a)jboss.org
* @since 26-Apr-2005
*/
+@Deprecated
public @interface InitParam
{
Modified: stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandler.java
===================================================================
--- stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandler.java 2007-09-25 09:15:08 UTC (rev 4618)
+++ stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandler.java 2007-09-25 09:46:52 UTC (rev 4619)
@@ -30,6 +30,7 @@
* @since 26-Apr-2005
* @deprecated
*/
+@Deprecated
public @interface SOAPMessageHandler
{
Modified: stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandlers.java
===================================================================
--- stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandlers.java 2007-09-25 09:15:08 UTC (rev 4618)
+++ stack/native/trunk/src/main/java/javax/jws/soap/SOAPMessageHandlers.java 2007-09-25 09:46:52 UTC (rev 4619)
@@ -40,6 +40,7 @@
*/
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
+@Deprecated
public @interface SOAPMessageHandlers
{
17 years, 3 months
JBossWS SVN: r4618 - stack/native/trunk/src/main/java/javax/xml/soap.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-09-25 05:15:08 -0400 (Tue, 25 Sep 2007)
New Revision: 4618
Modified:
stack/native/trunk/src/main/java/javax/xml/soap/SOAPConnection.java
stack/native/trunk/src/main/java/javax/xml/soap/SOAPFactory.java
Log:
Fix invalid commit for JBCTS-312: javax.xml.soap signature tests
Modified: stack/native/trunk/src/main/java/javax/xml/soap/SOAPConnection.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/soap/SOAPConnection.java 2007-09-25 06:42:25 UTC (rev 4617)
+++ stack/native/trunk/src/main/java/javax/xml/soap/SOAPConnection.java 2007-09-25 09:15:08 UTC (rev 4618)
@@ -63,7 +63,7 @@
*/
public SOAPMessage get(Object to) throws SOAPException
{
- throw new IllegalArgumentException("Should be implemented by concrete implementation of this class");
+ throw new IllegalStateException("Should be implemented by concrete implementation of this class");
}
/** Closes this SOAPConnection object.
Modified: stack/native/trunk/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/soap/SOAPFactory.java 2007-09-25 06:42:25 UTC (rev 4617)
+++ stack/native/trunk/src/main/java/javax/xml/soap/SOAPFactory.java 2007-09-25 09:15:08 UTC (rev 4618)
@@ -23,11 +23,10 @@
// $Id$
-import org.w3c.dom.Element;
-
import javax.xml.namespace.QName;
-import java.lang.reflect.Method;
+import org.w3c.dom.Element;
+
/** SOAPFactory is a factory for creating various objects that exist in the SOAP XML tree.
*
* SOAPFactory can be used to create XML fragments that will eventually end up in the SOAP part.
@@ -62,12 +61,9 @@
try
{
String propertyName = "javax.xml.soap.SOAPFactory";
-
- Class loaderClass = Class.forName("org.jboss.ws.soap.SAAJFactoryLoader");
- Method m = loaderClass.getMethod("loadFactory", new Class[] {String.class, String.class});
- soapFactory = (SOAPFactory)m.invoke(null, new Object[] {propertyName, null});
+ soapFactory = (SOAPFactory)SAAJFactoryLoader.loadFactory(propertyName, null);
}
- catch (Exception rte)
+ catch (RuntimeException rte)
{
throw new SOAPException(rte);
}
@@ -127,7 +123,7 @@
*/
public SOAPElement createElement(Element domElement) throws SOAPException
{
- throw new IllegalArgumentException("Should be implemented by concrete implementation of this class");
+ throw new IllegalStateException("Should be implemented by concrete implementation of this class");
}
/** Create a SOAPElement object initialized with the given local name.
@@ -168,7 +164,7 @@
*/
public SOAPElement createElement(QName qname) throws SOAPException
{
- throw new IllegalArgumentException("Should be implemented by concrete implementation of this class");
+ throw new IllegalStateException("Should be implemented by concrete implementation of this class");
}
/**
17 years, 3 months
JBossWS SVN: r4617 - legacy/branches.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-09-25 02:42:25 -0400 (Tue, 25 Sep 2007)
New Revision: 4617
Added:
legacy/branches/jbossws-1.0.0.GA_JBWS-1821/
Log:
made a copy
Copied: legacy/branches/jbossws-1.0.0.GA_JBWS-1821 (from rev 4616, legacy/tags/jbossws-1.0.0.GA)
17 years, 3 months
JBossWS SVN: r4616 - in stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse: signup and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-09-24 11:23:01 -0400 (Mon, 24 Sep 2007)
New Revision: 4616
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/NotEncodedTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RpcTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SimpleSignEncryptTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/signup/AccountSignupTestCase.java
Log:
[JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/NotEncodedTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/NotEncodedTestCase.java 2007-09-24 09:55:13 UTC (rev 4615)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/NotEncodedTestCase.java 2007-09-24 15:23:01 UTC (rev 4616)
@@ -53,12 +53,6 @@
*/
public void testEndpoint() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
Hello hello = (Hello)service.getPort(Hello.class);
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RpcTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RpcTestCase.java 2007-09-24 09:55:13 UTC (rev 4615)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RpcTestCase.java 2007-09-24 15:23:01 UTC (rev 4616)
@@ -48,12 +48,6 @@
public void testEndpoint() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
Hello hello = (Hello)service.getPort(Hello.class);
@@ -65,12 +59,6 @@
public void testFault() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
Hello hello = (Hello)service.getPort(Hello.class);
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SimpleSignEncryptTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SimpleSignEncryptTestCase.java 2007-09-24 09:55:13 UTC (rev 4615)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SimpleSignEncryptTestCase.java 2007-09-24 15:23:01 UTC (rev 4616)
@@ -52,12 +52,6 @@
public void testEndpoint() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/HelloService");
Hello hello = (Hello)service.getPort(Hello.class);
@@ -69,12 +63,6 @@
public void testEndpointNoProperties() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
Properties props = System.getProperties();
props.remove("org.jboss.ws.wsse.keyStore");
props.remove("org.jboss.ws.wsse.trustStore");
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java 2007-09-24 09:55:13 UTC (rev 4615)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase.java 2007-09-24 15:23:01 UTC (rev 4616)
@@ -48,12 +48,6 @@
*/
public void testWebClient() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
URL url = new URL("http://" + getServerHost() + ":8080/jaxrpc-wsse-rpc/RpcTestClientServlet?input=Hello");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
String res = br.readLine();
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/signup/AccountSignupTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/signup/AccountSignupTestCase.java 2007-09-24 09:55:13 UTC (rev 4615)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/wsse/signup/AccountSignupTestCase.java 2007-09-24 15:23:01 UTC (rev 4616)
@@ -43,12 +43,6 @@
public void testEndpoint() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBWS-1330] Fix jaxrpc wsse tests for jbossws-5.0");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/AccountSignupService");
AccountSignup signup = (AccountSignup)service.getPort(AccountSignup.class);
17 years, 3 months
JBossWS SVN: r4615 - in stack/native/trunk: src/main/etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-09-24 05:55:13 -0400 (Mon, 24 Sep 2007)
New Revision: 4615
Modified:
stack/native/trunk/src/main/etc/component-info50.xml
stack/native/trunk/version.properties
Log:
Update remoting
Modified: stack/native/trunk/src/main/etc/component-info50.xml
===================================================================
--- stack/native/trunk/src/main/etc/component-info50.xml 2007-09-24 09:37:52 UTC (rev 4614)
+++ stack/native/trunk/src/main/etc/component-info50.xml 2007-09-24 09:55:13 UTC (rev 4615)
@@ -12,9 +12,11 @@
</import>
<import componentref="jboss/jbossxb">
<compatible version="@jboss-jbossxb-jboss50@"/>
+ <compatible version="@jboss-jbossxb-jboss50@-brew"/>
</import>
<import componentref="jboss/remoting">
<compatible version="@jboss-remoting-jboss50@"/>
+ <compatible version="@jboss-remoting-jboss50@-brew"/>
</import>
<export>
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-09-24 09:37:52 UTC (rev 4614)
+++ stack/native/trunk/version.properties 2007-09-24 09:55:13 UTC (rev 4615)
@@ -33,7 +33,7 @@
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR4
-jboss-remoting-jboss50=2.2.0.SP4
+jboss-remoting-jboss50=2.2.2.SP1
# JBossAS-4.2
jboss-jbossxb-jboss42=1.0.0.CR11
17 years, 3 months
JBossWS SVN: r4614 - stack/native/tags/jbossws-native-2.0.1.SP1.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-09-24 05:37:52 -0400 (Mon, 24 Sep 2007)
New Revision: 4614
Modified:
stack/native/tags/jbossws-native-2.0.1.SP1/version.properties
Log:
Update to jboss-remoting-jboss50=2.2.2.SP1
Modified: stack/native/tags/jbossws-native-2.0.1.SP1/version.properties
===================================================================
--- stack/native/tags/jbossws-native-2.0.1.SP1/version.properties 2007-09-24 09:13:18 UTC (rev 4613)
+++ stack/native/tags/jbossws-native-2.0.1.SP1/version.properties 2007-09-24 09:37:52 UTC (rev 4614)
@@ -33,7 +33,7 @@
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR4
-jboss-remoting-jboss50=2.2.0.SP4
+jboss-remoting-jboss50=2.2.2.SP1
# JBossAS-4.2
jboss-jbossxb-jboss42=1.0.0.CR11
17 years, 3 months
JBossWS SVN: r4613 - stack/native/trunk/src/main/java/javax/jws.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-09-24 05:13:18 -0400 (Mon, 24 Sep 2007)
New Revision: 4613
Modified:
stack/native/trunk/src/main/java/javax/jws/HandlerChain.java
Log:
JBCTS-309: javax.jws signature tests
Modified: stack/native/trunk/src/main/java/javax/jws/HandlerChain.java
===================================================================
--- stack/native/trunk/src/main/java/javax/jws/HandlerChain.java 2007-09-24 08:53:53 UTC (rev 4612)
+++ stack/native/trunk/src/main/java/javax/jws/HandlerChain.java 2007-09-24 09:13:18 UTC (rev 4613)
@@ -50,7 +50,7 @@
/**
* Name of the handler chain in the configuration file
- * @deprecated
*/
+ @Deprecated
String name() default "";
};
17 years, 3 months