JBossWS SVN: r1346 - branches/dlofthouse
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-11-02 13:20:46 -0500 (Thu, 02 Nov 2006)
New Revision: 1346
Removed:
branches/dlofthouse/JBWS-1093/
Log:
Branch no longer required.
18 years, 2 months
JBossWS SVN: r1345 - in branches/jbossws-1.0/src: main/java/org/jboss/ws/deployment main/java/org/jboss/ws/integration/jboss main/java/org/jboss/ws/integration/tomcat main/resources/jbossws.war/Tomcat/WEB-INF test/ant test/java/org/jboss/test/ws/jaxrpc test/java/org/jboss/test/ws/jaxrpc/jbws1093 test/resources/jaxrpc test/resources/jaxrpc/jbws1093 test/resources/jaxrpc/jbws1093/META-INF test/resources/jaxrpc/jbws1093/WEB-INF test/resources/jaxrpc/jbws1093/WEB-INF/wsdl
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-11-02 13:19:31 -0500 (Thu, 02 Nov 2006)
New Revision: 1345
Added:
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/DeploymentLoader.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
Removed:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
Modified:
branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointDeployer.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossServiceEndpointPublisher.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java
branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
Log:
JBWS-1093 - Refactoring of deployment to allow correct identification of servlets and web services.
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointDeployer.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointDeployer.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointDeployer.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -37,7 +37,7 @@
import org.jboss.ws.server.WSDLFilePublisher;
/**
- * The POJO deployer for web service endpoints
+ * The deployer for web service endpoints
*
* @author Thomas.Diesler(a)jboss.org
* @since 12-May-2006
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/deployment/ServiceEndpointPublisher.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -24,12 +24,12 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.jboss.logging.Logger;
import org.jboss.ws.utils.DOMUtils;
@@ -78,22 +78,20 @@
{
this.servletName = servletName;
}
-
- public abstract String publishServiceEndpoint(URL warURL) throws Exception;
-
- public abstract String destroyServiceEndpoint(URL warURL) throws Exception;
-
+
public abstract String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
public abstract String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception;
- public Map<String, String> rewriteWebXML(URL warURL)
+ public abstract Set<String> getWebServiceServletLinks(UnifiedDeploymentInfo udi) throws Exception;
+
+ public Map<String, String> rewriteWebXML(UnifiedDeploymentInfo udi)
{
- File warFile = new File(warURL.getFile());
+ File warFile = new File(udi.localUrl.getFile());
if (warFile.isDirectory() == false)
- throw new WSException("Expected a war directory: " + warURL);
+ throw new WSException("Expected a war directory: " + udi.localUrl);
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ File webXML = new File(udi.localUrl.getFile() + "/WEB-INF/web.xml");
if (webXML.isFile() == false)
throw new WSException("Cannot find web.xml: " + webXML);
@@ -102,7 +100,8 @@
Element root = DOMUtils.parse(new FileInputStream(webXML));
String warName = warFile.getName();
- Map<String, String> sepTargetMap = modifyServletConfig(root, warName);
+ Set<String> wsServletLinks = getWebServiceServletLinks(udi);
+ Map<String, String> sepTargetMap = modifyServletConfig(root, warName, wsServletLinks);
// After redeployment there might be a stale copy of the original web.xml.org, we delete it
File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
@@ -128,7 +127,7 @@
}
}
- private Map<String, String> modifyServletConfig(Element root, String warName)
+ private Map<String, String> modifyServletConfig(Element root, String warName, Set<String> webServiceServlets)
{
Map<String, String> sepTargetMap = new HashMap<String, String>();
@@ -151,12 +150,12 @@
// Nothing to do if we have an <init-param>
if (isAlreadyModified(servletElement) == false)
{
- // Check if it is a real servlet that we can ignore
- if (servletClassName.endsWith("Servlet"))
+ // Check if the servlet is a known web service
+ if (webServiceServlets.contains(linkName) == false)
{
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + servletClassName);
+ log.info("Ignore servlet, not a known web service: " + linkName);
continue;
- }
+ }
// build a list of detached elements that come after <servlet-class>
boolean startDetach = false;
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/DeployerInterceptorJSE.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -86,12 +86,12 @@
if (udi != null)
{
ServiceEndpointPublisher endpointPublisher = getServiceEndpointPublisher();
- Map<String, String> sepTargetMap = endpointPublisher.rewriteWebXML(udi.localUrl);
+ Map<String, String> sepTargetMap = endpointPublisher.rewriteWebXML(udi);
updateServiceEndpointTargetBeans(udi, sepTargetMap);
}
return retn;
}
-
+
private void updateServiceEndpointTargetBeans(UnifiedDeploymentInfo udi, Map<String, String> sepTargetMap)
{
UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossServiceEndpointPublisher.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossServiceEndpointPublisher.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/jboss/JBossServiceEndpointPublisher.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -24,6 +24,8 @@
// $Id: WebServiceDeployer.java 312 2006-05-11 10:49:22Z thomas.diesler(a)jboss.com $
import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
import javax.management.MBeanServer;
@@ -34,6 +36,10 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.ws.deployment.ServiceEndpointPublisher;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.EndpointMetaData;
+import org.jboss.ws.metadata.ServerEndpointMetaData;
+import org.jboss.ws.metadata.ServiceMetaData;
+import org.jboss.ws.metadata.UnifiedMetaData;
/**
* Publish the HTTP service endpoint to Tomcat
@@ -44,19 +50,6 @@
public class JBossServiceEndpointPublisher extends ServiceEndpointPublisher
{
- public String publishServiceEndpoint(URL warURL) throws Exception
- {
- rewriteWebXML(warURL);
- getMainDeployer().deploy(warURL);
- return "OK";
- }
-
- public String destroyServiceEndpoint(URL warURL) throws Exception
- {
- getMainDeployer().undeploy(warURL);
- return "OK";
- }
-
public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
URL warURL = udi.localUrl;
@@ -64,7 +57,7 @@
if (di == null)
throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
- rewriteWebXML(warURL);
+ rewriteWebXML(udi);
// Preserve the repository config
DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
@@ -75,9 +68,29 @@
public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- return destroyServiceEndpoint(udi.localUrl);
+ getMainDeployer().undeploy(udi.localUrl);
+ return "OK";
}
+
+ public Set<String> getWebServiceServletLinks(UnifiedDeploymentInfo udi)
+ {
+ Set<String> links = new HashSet<String>();
+
+ UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
+ for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
+ {
+ for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
+ {
+ ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
+ links.add(sepMetaData.getLinkName());
+
+ }
+ }
+
+ return links;
+ }
+
private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException
{
MBeanServer server = MBeanServerLocator.locateJBoss();
Added: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/DeploymentLoader.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/DeploymentLoader.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/DeploymentLoader.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.tomcat;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+/**
+ * A classloader to be used during deployment to load servlet
+ * classes to allow them to be tested for annotations.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Nov 2, 2006
+ */
+public class DeploymentLoader extends URLClassLoader
+{
+
+ public DeploymentLoader(ClassLoader parent)
+ {
+ super(new URL[] {}, parent);
+ }
+
+
+ public static DeploymentLoader newInstance(URL warUrl)
+ {
+ DeploymentLoader loader = new DeploymentLoader(Thread.currentThread().getContextClassLoader());
+
+ File classesDir = new File(warUrl.getFile() + "/WEB-INF/classes");
+ if (classesDir.exists())
+ {
+ loader.addURL(toURL(classesDir));
+ }
+
+ File libDir = new File(warUrl.getFile() + "/WEB-INF/lib");
+ if (libDir.exists() && libDir.isDirectory())
+ {
+ File[] files = libDir.listFiles();
+ for (int i = 0; i < files.length; i++)
+ {
+ File file = files[i];
+ loader.addURL(toURL(file));
+ }
+ }
+
+ return loader;
+ }
+
+ private static URL toURL(File file)
+ {
+ try
+ {
+ return file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ return null;
+ }
+ }
+}
Property changes on: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/DeploymentLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointPublisher.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -24,16 +24,28 @@
// $Id$
import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.jboss.logging.Logger;
-import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
import org.jboss.ws.deployment.ServiceEndpointPublisher;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.jsr109.PortComponentMetaData;
+import org.jboss.ws.metadata.jsr109.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.jsr109.WebservicesFactory;
+import org.jboss.ws.metadata.jsr109.WebservicesMetaData;
+import org.jboss.ws.utils.DOMUtils;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.w3c.dom.Element;
/**
* Publish the HTTP service endpoint to Tomcat
@@ -45,7 +57,7 @@
{
// logging support
private static Logger log = Logger.getLogger(TomcatServiceEndpointPublisher.class);
-
+
private boolean isRunning;
private File targetDir;
private File deployDir;
@@ -67,7 +79,7 @@
{
this.targetDir = new File(dirName);
if (targetDir.isDirectory() == false)
- throw new IllegalArgumentException ("Target dir does not exist: " + targetDir);
+ throw new IllegalArgumentException("Target dir does not exist: " + targetDir);
}
public void setInterval(long interval)
@@ -75,35 +87,143 @@
this.interval = interval;
}
- public String publishServiceEndpoint(URL warURL) throws Exception
+ public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- new wspublish().process(warURL, targetDir, servletName);
+ new wspublish().process(udi.url, targetDir, servletName);
return "OK";
}
- public String destroyServiceEndpoint(URL warURL) throws Exception
+ public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- File targetFile = new File(targetDir.getAbsolutePath() + "/" + new File(warURL.getFile()).getName());
+ File targetFile = new File(targetDir.getAbsolutePath() + "/" + new File(udi.url.getFile()).getName());
if (targetFile.delete())
return "OK";
+ else return "NOT FOUND";
+ }
+
+ public Set<String> getWebServiceServletLinks(UnifiedDeploymentInfo udi) throws Exception
+ {
+ File warDir = new File(udi.localUrl.getFile());
+
+ if (warDir.exists() == false || warDir.isDirectory() == false)
+ {
+ throw new IllegalArgumentException("Invalid localUrl " + udi.localUrl);
+ }
+
+ File webServicesXml = new File(warDir.getCanonicalPath() + "/WEB-INF/webservices.xml");
+ if (webServicesXml.exists())
+ {
+ return readWebservicesXmlLinks(webServicesXml.toURL());
+ }
else
- return "NOT FOUND";
+ {
+ return testAnnotatedServices(udi);
+ }
}
- public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
+ private Set<String> readWebservicesXmlLinks(URL webServicesXml)
{
- throw new NotImplementedException();
+ HashSet<String> links = new HashSet<String>();
+
+ try
+ {
+ InputStream is = webServicesXml.openStream();
+ try
+ {
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new WebservicesFactory(webServicesXml);
+ WebservicesMetaData jsr109MetaData = (WebservicesMetaData)unmarshaller.unmarshal(is, factory, null);
+
+ for (WebserviceDescriptionMetaData currentWebService : jsr109MetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData currentPort : currentWebService.getPortComponents())
+ {
+ String servletLink = currentPort.getServletLink();
+ if (servletLink != null && servletLink.length() > 0)
+ {
+ links.add(servletLink);
+ }
+ }
+ }
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new WSException(e);
+ }
+
+ return links;
}
- public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
+ private Set<String> testAnnotatedServices(UnifiedDeploymentInfo udi)
{
- throw new NotImplementedException();
+ HashSet<String> links = new HashSet<String>();
+
+ try
+ {
+ ClassLoader warClassLoader = DeploymentLoader.newInstance(udi.localUrl);
+ File webXML = new File(udi.localUrl.getFile() + "/WEB-INF/web.xml");
+ Element root = DOMUtils.parse(new FileInputStream(webXML));
+
+ Iterator itServlets = DOMUtils.getChildElements(root, "servlet");
+
+ while (itServlets.hasNext())
+ {
+ Element servletElement = (Element)itServlets.next();
+ String linkName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(servletElement, "servlet-name"));
+
+ // find the servlet-class
+ Element classElement = DOMUtils.getFirstChildElement(servletElement, "servlet-class");
+ if (classElement == null)
+ throw new WSException("Cannot find <servlet-class> for servlet-name: " + linkName);
+ String servletClassName = DOMUtils.getTextContent(classElement);
+
+ log.debug("Testing '" + linkName + "', '" + servletClassName + "'");
+
+ try
+ {
+ Class servletClass = warClassLoader.loadClass(servletClassName);
+
+ if (servletClass.isAnnotationPresent(javax.jws.WebService.class))
+ {
+ links.add(linkName);
+ }
+ else
+ {
+ log.debug("Servlet for '" + linkName + "' not annotated with javax.jws.WebService, assuming normal servlet");
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Unable to load class '" + servletClassName + "' for servlet '" + linkName + "'", e);
+ }
+
+ }
+ }
+ catch (RuntimeException e)
+ {
+ throw e;
+ }
+ catch (Exception e)
+ {
+ throw new WSException(e);
+ }
+
+ return links;
}
-
+
private void scanDeployDir()
{
List<File> fileList = Arrays.asList(deployDir.listFiles());
-
+
// deploy new files
for (File file : fileList)
{
@@ -113,7 +233,7 @@
deployedFiles.add(file);
}
}
-
+
// undeploy files
for (File file : deployedFiles)
{
@@ -132,8 +252,10 @@
if (new File(targetDir.getAbsolutePath() + "/" + file.getName()).exists() == false)
{
System.out.println("Deploy file: " + file);
- publishServiceEndpoint(file.toURL());
- }
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(null);
+ udi.url = file.toURL();
+ publishServiceEndpoint(udi);
+ }
else
{
System.out.println("Ignore file: " + file);
@@ -142,7 +264,7 @@
catch (Exception ex)
{
log.error("Cannot deploy file: " + file, ex);
- }
+ }
}
private void undeployFile(File file)
@@ -152,8 +274,10 @@
if (new File(targetDir.getAbsolutePath() + "/" + file.getName()).exists())
{
System.out.println("Undeploy file: " + file);
- destroyServiceEndpoint(file.toURL());
- }
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(null);
+ udi.url = file.toURL();
+ destroyServiceEndpoint(udi);
+ }
else
{
System.out.println("Ignore file: " + file);
@@ -162,7 +286,7 @@
catch (Exception ex)
{
log.error("Cannot undeploy file: " + file, ex);
- }
+ }
}
// bean lifecycle start
Modified: branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java
===================================================================
--- branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/java/org/jboss/ws/integration/tomcat/wspublish.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -32,6 +32,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.file.JarUtils;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
/**
* Publish a standard portable J2EE web service endpoint
@@ -69,7 +70,9 @@
TomcatServiceEndpointPublisher publisher = new TomcatServiceEndpointPublisher();
publisher.setServiceEndpointServlet(servletName);
- publisher.rewriteWebXML(tmpDir.toURL());
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(null);
+ udi.localUrl = tmpDir.toURL();
+ publisher.rewriteWebXML(udi);
File outFile = new File(destDir.getCanonicalPath() + "/" + warName);
outFile.getParentFile().mkdirs();
Modified: branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml
===================================================================
--- branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/main/resources/jbossws.war/Tomcat/WEB-INF/log4j.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -22,7 +22,7 @@
<!-- A time/date based rolling appender -->
<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <param name="File" value="/usr/java/tomcat/logs/jbossws.log"/>
+ <param name="File" value="../logs/jbossws.log"/>
<param name="Append" value="false"/>
<!-- Rollover at midnight each day -->
Modified: branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml 2006-11-02 16:50:38 UTC (rev 1344)
+++ branches/jbossws-1.0/src/test/ant/build-jars-jaxrpc.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -565,6 +565,33 @@
</metainf>
</jar>
+ <!-- jbossws-jbws1093 -->
+ <war warfile="${build.test.dir}/libs/jaxrpc-jbws1093.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.class"/>
+ </classes>
+ <webinf dir="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF">
+ <include name="webservices.xml"/>
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </webinf>
+ </war>
+ <jar destfile="${build.test.dir}/libs/jaxrpc-jbws1093-client.jar">
+ <fileset dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jbws1093/TestEndpoint.class"/>
+ </fileset>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1093/META-INF">
+ <include name="application-client.xml"/>
+ <include name="jboss-client.xml"/>
+ </metainf>
+ <metainf dir="${build.test.dir}/resources/jaxrpc/jbws1093/WEB-INF">
+ <include name="jaxrpc-mapping.xml"/>
+ <include name="wsdl/**"/>
+ </metainf>
+ </jar>
+
<!-- jaxrpc-jbws1107 -->
<war warfile="${build.test.dir}/libs/jaxrpc-jbws1107.war" webxml="${build.test.dir}/resources/jaxrpc/jbws1107/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093 (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1093;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.rpc.Service;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
-
-/**
- * Test case to test that when a deployment contains both an endpoint and a
- * servlet both are deployed correctly and can be accessed.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 17-October-2006
- */
-public class JBWS1093TestCase extends JBossWSTest
-{
-
- private static TestEndpoint port;
-
- public static Test suite() throws Exception
- {
- return JBossWSTestSetup.newTestSetup(JBWS1093TestCase.class, "jaxrpc-jbws1093.war, jaxrpc-jbws1093-client.jar");
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- if (port == null)
- {
- if (isTargetServerJBoss())
- {
- InitialContext iniCtx = getInitialContext();
- Service service = (Service)iniCtx.lookup("java:comp/env/service/TestService");
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- else
- {
- ServiceFactoryImpl factory = new ServiceFactoryImpl();
- URL wsdlURL = new File("resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl").toURL();
- URL mappingURL = new File("resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml").toURL();
- QName qname = new QName("http://org.jboss.test.ws/jbws1093", "TestService");
- Service service = factory.createService(wsdlURL, qname, mappingURL);
- port = (TestEndpoint)service.getPort(TestEndpoint.class);
- }
- }
- }
-
- public void testAccessServlet() throws Exception
- {
- String host = System.getProperty("jbosstest.host.name");
- URL servletURL = new URL("http://" + host + ":8080" + "/jaxrpc-jbws1093/ServletTest");
-
- InputStream is = servletURL.openStream();
- InputStreamReader isr = new InputStreamReader(is);
- BufferedReader br = new BufferedReader(isr);
-
- String line = br.readLine();
-
- assertEquals(ServletTest.MESSAGE, line);
- }
-
- public void testAccessEnpoint() throws Exception
- {
- assertEquals(ServletTest.MESSAGE, port.echoString(ServletTest.MESSAGE));
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/JBWS1093TestCase.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1093;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * JBWS-1093 - This servlet is called ServletTest to check that we are
- * not identifying servlets by the classname ending in 'Servlet'.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 17-October-2006
- */
-public class ServletTest extends HttpServlet
-{
-
- private static final long serialVersionUID = 8465532467878198647L;
-
- public static final String MESSAGE = "Success!!";
-
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- {
- ServletOutputStream sos = response.getOutputStream();
- sos.println(MESSAGE);
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/ServletTest.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1093;
-
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-
-/**
- * @author darran.lofthouse(a)jboss.com
- * @since 17-October-2006
- */
-public interface TestEndpoint extends Remote
-{
-
- public String echoString(final String message) throws RemoteException;
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpoint.java)
Deleted: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxrpc.jbws1093;
-
-import java.rmi.RemoteException;
-
-/**
- * @author darran.lofthouse(a)jboss.com
- * @since 17-October-2006
- */
-public class TestEndpointImpl implements TestEndpoint
-{
-
- public String echoString(String message) throws RemoteException
- {
- return message;
- }
-
-}
Copied: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/java/org/jboss/test/ws/jaxrpc/jbws1093/TestEndpointImpl.java)
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093 (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093)
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
-
- <display-name>TestService</display-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <service-interface>javax.xml.rpc.Service</service-interface>
- <wsdl-file>META-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component-ref>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
- </port-component-ref>
- </service-ref>
-
-</application-client>
-
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/application-client.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='UTF-8' ?>
-
-<!DOCTYPE jboss-client PUBLIC
- "-//JBoss//DTD Application Client 4.0//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-client_4_0.dtd">
-
-<jboss-client>
- <jndi-name>jbossws-client</jndi-name>
-
- <service-ref>
- <service-ref-name>service/TestService</service-ref-name>
- <wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-jbws1093/TestEndpoint?wsdl</wsdl-override>
- </service-ref>
-
-</jboss-client>
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/META-INF/jboss-client.xml)
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,37 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
- <package-mapping>
- <package-type>org.jboss.test.ws.jaxrpc.jbws1093</package-type>
- <namespaceURI>http://org.jboss.test.ws/jbws1093/types</namespaceURI>
- </package-mapping>
- <service-interface-mapping>
- <service-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestService</service-interface>
- <wsdl-service-name xmlns:serviceNS='http://org.jboss.test.ws/jbws1093'>serviceNS:TestService</wsdl-service-name>
- <port-mapping>
- <port-name>TestEndpointPort</port-name>
- <java-port-name>TestEndpointPort</java-port-name>
- </port-mapping>
- </service-interface-mapping>
- <service-endpoint-interface-mapping>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
- <wsdl-port-type xmlns:portTypeNS='http://org.jboss.test.ws/jbws1093'>portTypeNS:TestEndpoint</wsdl-port-type>
- <wsdl-binding xmlns:bindingNS='http://org.jboss.test.ws/jbws1093'>bindingNS:TestEndpointBinding</wsdl-binding>
- <service-endpoint-method-mapping>
- <java-method-name>echoString</java-method-name>
- <wsdl-operation>echoString</wsdl-operation>
- <method-param-parts-mapping>
- <param-position>0</param-position>
- <param-type>java.lang.String</param-type>
- <wsdl-message-mapping>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1093'>wsdlMsgNS:TestEndpoint_echoString</wsdl-message>
- <wsdl-message-part-name>String_1</wsdl-message-part-name>
- <parameter-mode>IN</parameter-mode>
- </wsdl-message-mapping>
- </method-param-parts-mapping>
- <wsdl-return-value-mapping>
- <method-return-value>java.lang.String</method-return-value>
- <wsdl-message xmlns:wsdlMsgNS='http://org.jboss.test.ws/jbws1093'>wsdlMsgNS:TestEndpoint_echoStringResponse</wsdl-message>
- <wsdl-message-part-name>result</wsdl-message-part-name>
- </wsdl-return-value-mapping>
- </service-endpoint-method-mapping>
- </service-endpoint-interface-mapping>
-</java-wsdl-mapping>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/jaxrpc-mapping.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>ServletTest</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1093.ServletTest</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ServletTest</servlet-name>
- <url-pattern>/ServletTest</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/TestEndpoint</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/web.xml)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,15 +0,0 @@
-<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://org.jboss.test.ws/jbws1093' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
- <webservice-description>
- <webservice-description-name>TestService</webservice-description-name>
- <wsdl-file>WEB-INF/wsdl/TestService.wsdl</wsdl-file>
- <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
- <port-component>
- <port-component-name>TestEndpointPort</port-component-name>
- <wsdl-port>impl:TestEndpointPort</wsdl-port>
- <service-endpoint-interface>org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint</service-endpoint-interface>
- <service-impl-bean>
- <servlet-link>TestEndpoint</servlet-link>
- </service-impl-bean>
- </port-component>
- </webservice-description>
-</webservices>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/webservices.xml)
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl)
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1093' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1093' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
- <types/>
- <message name='TestEndpoint_echoString'>
- <part name='String_1' type='xsd:string'/>
- </message>
- <message name='TestEndpoint_echoStringResponse'>
- <part name='result' type='xsd:string'/>
- </message>
- <portType name='TestEndpoint'>
- <operation name='echoString' parameterOrder='String_1'>
- <input message='tns:TestEndpoint_echoString'/>
- <output message='tns:TestEndpoint_echoStringResponse'/>
- </operation>
- </portType>
- <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='echoString'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
- </output>
- </operation>
- </binding>
- <service name='TestService'>
- <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
- <soap:address location='http://localhost:8080//jbossws-jbws1093/TestEndpoint?wsdl'/>
- </port>
- </service>
-</definitions>
\ No newline at end of file
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl)
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/WEB-INF/wsdl/TestService.wsdl 2006-11-02 18:19:31 UTC (rev 1345)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='TestService' targetNamespace='http://org.jboss.test.ws/jbws1093' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.test.ws/jbws1093' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types/>
+ <message name='TestEndpoint_echoString'>
+ <part name='String_1' type='xsd:string'/>
+ </message>
+ <message name='TestEndpoint_echoStringResponse'>
+ <part name='result' type='xsd:string'/>
+ </message>
+ <portType name='TestEndpoint'>
+ <operation name='echoString' parameterOrder='String_1'>
+ <input message='tns:TestEndpoint_echoString'/>
+ <output message='tns:TestEndpoint_echoStringResponse'/>
+ </operation>
+ </portType>
+ <binding name='TestEndpointBinding' type='tns:TestEndpoint'>
+ <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echoString'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.test.ws/jbws1093' use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='TestService'>
+ <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+ <soap:address location='http://localhost:8080//jaxrpc-jbws1093/TestEndpoint?wsdl'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Deleted: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/wstools-config.xml
===================================================================
--- branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml 2006-10-17 22:00:26 UTC (rev 1249)
+++ branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/wstools-config.xml 2006-11-02 18:19:31 UTC (rev 1345)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- wstools -cp ../../../../../output/tests/classes -dest ./WEB-INF -config wstools-config.xml
--->
-
-<!-- Set the soap:address location to 'http://localhost:8080//jbossws-jbws1093/TestEndpoint?wsdl' to run with Tomcat -->
-
-<configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
- <java-wsdl>
- <service name="TestService" endpoint="org.jboss.test.ws.jaxrpc.jbws1093.TestEndpoint" style="rpc">
- </service>
- <namespaces target-namespace="http://org.jboss.test.ws/jbws1093" type-namespace="http://org.jboss.test.ws/jbws1093/types"/>
- <mapping file="jaxrpc-mapping.xml"/>
- <webservices servlet-link="TestEndpoint"/>
- </java-wsdl>
-</configuration>
Copied: branches/jbossws-1.0/src/test/resources/jaxrpc/jbws1093/wstools-config.xml (from rev 1249, branches/dlofthouse/JBWS-1093/src/test/resources/jaxrpc/jbws1093/wstools-config.xml)
18 years, 2 months
JBossWS SVN: r1344 - in branches/JEE5_TCK/src: main/java/org/jboss/ws/binding main/java/org/jboss/ws/deployment main/java/org/jboss/ws/jaxrpc main/java/org/jboss/ws/jaxws main/java/org/jboss/ws/metadata main/java/org/jboss/ws/metadata/acessor main/java/org/jboss/ws/tools main/java/org/jboss/ws/tools/helpers main/java/org/jboss/ws/tools/metadata test/ant test/java/org/jboss/test/ws/jaxws test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding test/java/org/jboss/test/ws/jaxws/logicalhandler te
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2006-11-02 11:50:38 -0500 (Thu, 02 Nov 2006)
New Revision: 1344
Added:
branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/WrappedParameter.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/
branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/ReflectiveMethodAccessor.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorTestCase.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessor.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessorResponse.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessor.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessorResponse.java
branches/JEE5_TCK/src/test/resources/jaxws/wrapped/
branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/
branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/
branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/web.xml
Modified:
branches/JEE5_TCK/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXB.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXBImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSource.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSourceImpl.java
branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
Log:
JBWS-1320 Refactor WrappedParameters to use accessors
Also fix namespace usage with doc wrapped
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/binding/EndpointInvocation.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/binding/EndpointInvocation.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -42,7 +42,7 @@
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.soap.SOAPContentElement;
import org.jboss.ws.utils.HolderUtils;
import org.jboss.ws.utils.JavaUtils;
@@ -337,12 +337,12 @@
{
try
{
- if (param.index >= 0)
- outParameters.put(param.index, targetParameterTypes[param.index].newInstance());
+ if (param.getIndex() >= 0)
+ outParameters.put(param.getIndex(), targetParameterTypes[param.getIndex()].newInstance());
}
catch (Exception e)
{
- throw new WSException("Could not add output param: " + param.name, e);
+ throw new WSException("Could not add output param: " + param.getName(), e);
}
}
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR109MetaDataBuilder.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -50,7 +50,7 @@
import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.ws.metadata.TypeMappingMetaData;
import org.jboss.ws.metadata.TypesMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.metadata.jaxrpcmapping.ExceptionMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/deployment/JSR181MetaDataBuilder.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -78,8 +78,9 @@
import org.jboss.ws.metadata.TypeMappingMetaData;
import org.jboss.ws.metadata.TypesMetaData;
import org.jboss.ws.metadata.UnifiedMetaData;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.metadata.HandlerMetaData.HandlerType;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.acessor.JAXBAccessor;
import org.jboss.ws.metadata.config.jaxws.WSEndpointConfigJAXWS;
import org.jboss.ws.metadata.j2ee.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
@@ -451,14 +452,14 @@
String variable = convertToVariable(wrappedElementName.getLocalPart());
WrappedParameter wrappedParameter = new WrappedParameter(wrappedElementName, javaTypeName, variable, i);
- wrappedParameter.typeArguments = convertTypeArguments(javaType, genericType);
+ wrappedParameter.setTypeArguments(convertTypeArguments(javaType, genericType));
if (mode != ParameterMode.OUT)
wrappedParameters.add(wrappedParameter);
if (mode != ParameterMode.IN)
{
wrappedOutputParameters.add(wrappedParameter);
- wrappedParameter.holder = true;
+ wrappedParameter.setHolder(true);
}
}
else
@@ -493,7 +494,7 @@
if (isWrapped)
{
WrappedParameter wrapped = new WrappedParameter(xmlName, returnTypeName, convertToVariable(xmlName.getLocalPart()), -1);
- wrapped.typeArguments = convertTypeArguments(returnType, genericReturnType);
+ wrapped.setTypeArguments(convertTypeArguments(returnType, genericReturnType));
// insert at the beginning just for prettiness
wrappedOutputParameters.add(0, wrapped);
@@ -575,6 +576,7 @@
}
ParameterMetaData retMetaData = new ParameterMetaData(operation, xmlName, xmlType, responseWrapperType);
+ retMetaData.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
operation.setReturnParameter(retMetaData);
return retMetaData;
@@ -606,6 +608,7 @@
// JAX-WS p.37 pg.1, the annotation only affects the element name, not the type name
ParameterMetaData wrapperParameter = new ParameterMetaData(operation, xmlName, xmlType, requestWrapperType);
+ wrapperParameter.setAccessorFactoryCreator(JAXBAccessor.FACTORY_CREATOR);
operation.addParameter(wrapperParameter);
return wrapperParameter;
@@ -717,54 +720,66 @@
private QName getWebParamName(OperationMetaData opMetaData, int index, Class javaType, WebParam webParam)
{
- QName xmlName = null;
- String namespaceURI = opMetaData.getQName().getNamespaceURI();
+ String namespace = null ;
+ String name = null;
+ boolean header = false;
+
if (webParam != null)
{
if (webParam.targetNamespace().length() > 0)
- namespaceURI = webParam.targetNamespace();
+ namespace = webParam.targetNamespace();
if (webParam.name().length() > 0)
- {
- if (opMetaData.getStyle() != Style.RPC || webParam.header())
- xmlName = new QName(namespaceURI, webParam.name());
- else xmlName = new QName(webParam.name());
- }
+ name = webParam.name();
+
+ header = webParam.header();
}
- if (xmlName == null && opMetaData.isDocumentBare())
- xmlName = new QName(namespaceURI, opMetaData.getQName().getLocalPart());
+ // Bare and headers must be qualified
+ if (namespace == null && (opMetaData.isDocumentBare() || header))
+ namespace = opMetaData.getQName().getNamespaceURI();
- if (xmlName == null)
- xmlName = (opMetaData.isDocumentWrapped()) ? new QName(namespaceURI, "arg" + index) : new QName("arg" + index);
+ // RPC body parts must have no namespace
+ else if (opMetaData.isRPCLiteral() && !header)
+ namespace = null;
- return xmlName;
+ // Bare uses the operation name as the default, everything else is generated
+ if (name == null)
+ name = opMetaData.isDocumentBare() && !header ? opMetaData.getQName().getLocalPart() : "arg" + index;
+
+ return (namespace != null) ? new QName(namespace, name) : new QName(name);
}
private QName getWebResultName(OperationMetaData opMetaData, Class javaType, WebResult anWebResult)
{
- QName xmlName = null;
- String namespaceURI = opMetaData.getQName().getNamespaceURI();
+ String name = null;
+ String namespace = null;
+ boolean header = false;
if (anWebResult != null)
{
if (anWebResult.targetNamespace().length() > 0)
- namespaceURI = anWebResult.targetNamespace();
+ namespace = anWebResult.targetNamespace();
if (anWebResult.name().length() > 0)
- {
- if (opMetaData.getStyle() != Style.RPC || anWebResult.header())
- xmlName = new QName(namespaceURI, anWebResult.name());
- else xmlName = new QName(anWebResult.name());
- }
+ name = anWebResult.name();
+
+ header = anWebResult.header();
}
- if (xmlName == null && opMetaData.isDocumentBare())
- xmlName = new QName(namespaceURI, opMetaData.getResponseName().getLocalPart());
- if (xmlName == null)
- xmlName = (opMetaData.isDocumentWrapped() ? new QName(namespaceURI, "return") : new QName("return"));
+ // Bare and headers must be qualified
+ if (namespace == null && (opMetaData.isDocumentBare() || header))
+ namespace = opMetaData.getQName().getNamespaceURI();
- return xmlName;
+ // RPC body parts must have no namespace
+ else if (opMetaData.isRPCLiteral() && !header)
+ namespace = null;
+
+ // Bare uses the operation name as the default, everything else is generated
+ if (name == null)
+ name = opMetaData.isDocumentBare() && !header ? opMetaData.getResponseName().getLocalPart() : "return";
+
+ return (namespace != null) ? new QName(namespace, name) : new QName(name);
}
private void addFault(OperationMetaData omd, Class<?> exception)
@@ -921,5 +936,4 @@
}
}
}
-
-}
+}
\ No newline at end of file
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxrpc/ParameterWrapping.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -49,7 +49,7 @@
import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.ws.metadata.TypeMappingMetaData;
import org.jboss.ws.metadata.TypesMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.utils.HolderUtils;
import org.jboss.ws.utils.JavaUtils;
@@ -111,11 +111,8 @@
Object reqStruct = reqStructType.newInstance();
for (WrappedParameter param : wrappedParameters)
{
- PropertyDescriptor pd = new PropertyDescriptor(param.variable, reqStructType);
- Method method = pd.getWriteMethod();
- Object value = holderValue(methodParams[param.index]);
- log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
- method.invoke(reqStruct, value);
+ Object value = holderValue(methodParams[param.getIndex()]);
+ param.accessor().set(reqStruct, value);
}
return reqStruct;
@@ -146,23 +143,19 @@
log.debug("unwrapRequestParameters: " + reqStructType.getName());
try
{
- for (ParameterMetaData.WrappedParameter param : wrappedParameters)
+ for (WrappedParameter param : wrappedParameters)
{
- PropertyDescriptor pd = new PropertyDescriptor(param.variable, reqStructType);
- Method method = pd.getReadMethod();
- Class targetType = targetParameterTypes[param.index];
+ Class targetType = targetParameterTypes[param.getIndex()];
+ Object value = param.accessor().get(reqStruct);
- Object value = method.invoke(reqStruct);
-
// INOUT Parameter
if (HolderUtils.isHolderType(targetType))
{
value = HolderUtils.createHolderInstance(value, targetType);
- outParameters.put(param.index, value);
+ outParameters.put(param.getIndex(), value);
}
- log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
- methodParams[param.index] = value;
+ methodParams[param.getIndex()] = value;
}
}
catch (RuntimeException rte)
@@ -189,18 +182,15 @@
}
log.debug("wrapResponseParameter: " + resStructType.getName());
- List<ParameterMetaData.WrappedParameter> wrappedParameters = returnMetaData.getWrappedParameters();
+ List<WrappedParameter> wrappedParameters = returnMetaData.getWrappedParameters();
try
{
Object resStruct = resStructType.newInstance();
- for (ParameterMetaData.WrappedParameter param : wrappedParameters)
+ for (WrappedParameter param : wrappedParameters)
{
- PropertyDescriptor pd = new PropertyDescriptor(param.variable, resStructType);
- Method method = pd.getWriteMethod();
- Object value = (param.index < 0) ? returnValue : holderValue(outParameters.get(param.index));
- log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
- method.invoke(resStruct, value);
+ Object value = (param.getIndex() < 0) ? returnValue : holderValue(outParameters.get(param.getIndex()));
+ param.accessor().set(resStruct, value);
}
return resStruct;
}
@@ -231,20 +221,17 @@
{
for (WrappedParameter param : wrappedParameters)
{
- PropertyDescriptor pd = new PropertyDescriptor(param.variable, resStructType);
- Method method = pd.getReadMethod();
- Object value = method.invoke(resStruct, new Object[] {});
- log.debug(" " + method.getName() + ": " + (value != null ? value.getClass().getName() : null));
- if (param.index < 0)
+ Object value = param.accessor().get(resStruct);
+ if (param.getIndex() < 0)
{
retValue = value;
}
else
{
- Class targetType = targetTypes[param.index];
+ Class targetType = targetTypes[param.getIndex()];
if (HolderUtils.isHolderType(targetType))
value = HolderUtils.createHolderInstance(value, targetType);
- methodParams[param.index] = value;
+ methodParams[param.getIndex()] = value;
}
}
}
@@ -310,11 +297,11 @@
for (WrappedParameter param : wrappedParameters)
{
- CtField field = new CtField(pool.get(param.type), param.variable, clazz);
+ CtField field = new CtField(pool.get(param.getType()), param.getVariable(), clazz);
field.setModifiers(Modifier.PRIVATE);
clazz.addField(field);
- clazz.addMethod(CtNewMethod.getter("get" + JavaUtils.capitalize(param.variable), field));
- clazz.addMethod(CtNewMethod.setter("set" + JavaUtils.capitalize(param.variable), field));
+ clazz.addMethod(CtNewMethod.getter("get" + JavaUtils.capitalize(param.getVariable()), field));
+ clazz.addMethod(CtNewMethod.setter("set" + JavaUtils.capitalize(param.getVariable()), field));
}
wrapperType = (Class)pool.toClass(clazz, loader);
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/jaxws/DynamicWrapperGenerator.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -47,7 +47,7 @@
import org.jboss.ws.metadata.FaultMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.utils.JavaUtils;
import org.jboss.ws.utils.JavassistUtils;
@@ -98,7 +98,7 @@
for (WrappedParameter parameter : wrappedParameters)
{
- addProperty(clazz, parameter.type, parameter.name, parameter.variable, parameter.typeArguments);
+ addProperty(clazz, parameter.getType(), parameter.getName(), parameter.getVariable(), parameter.getTypeArguments());
}
pool.toClass(clazz, loader);
}
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/ParameterMetaData.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -38,8 +38,9 @@
import org.jboss.ws.WSException;
import org.jboss.ws.jaxrpc.ParameterWrapping;
import org.jboss.ws.jaxws.DynamicWrapperGenerator;
+import org.jboss.ws.metadata.WrappedParameter.AccessorFactory;
+import org.jboss.ws.metadata.acessor.ReflectiveMethodAccessor;
import org.jboss.ws.utils.HolderUtils;
-import org.jboss.ws.utils.IOUtils;
import org.jboss.ws.utils.JavaUtils;
/**
@@ -72,7 +73,13 @@
// SOAP-ENC:Array
private boolean soapArrayParam;
private QName soapArrayCompType;
+ private AccessorFactoryCreator accessorFactoryCreator = ReflectiveMethodAccessor.FACTORY_CREATOR;
+ public static interface AccessorFactoryCreator
+ {
+ public AccessorFactory create(ParameterMetaData parameter);
+ }
+
public ParameterMetaData(OperationMetaData opMetaData, QName xmlName, QName xmlType, String javaTypeName)
{
this(opMetaData, xmlName, javaTypeName);
@@ -95,34 +102,6 @@
this.javaTypeName = javaTypeName;
}
- public static class WrappedParameter
- {
- public static final int RETURN = -1;
- public QName name;
- public String type;
- public String[] typeArguments;
- public String variable;
- public boolean holder = false;
- public int index = -2;
-
- public WrappedParameter()
- {
- }
-
- public WrappedParameter(QName name, String type, String variable, int index)
- {
- this.name = name;
- this.type = type;
- this.variable = variable;
- this.index = index;
- }
-
- public String toString()
- {
- return "[name = " + name + ", type = " + type + ", typeArgs = " + IOUtils.printArray(typeArguments) + ", variable = " + variable + ", index = " + index + "]";
- }
- }
-
private static boolean matchParameter(Method method, int index, Class expectedType, Set<Integer> matches, boolean exact, boolean holder)
{
Class returnType = method.getReturnType();
@@ -362,8 +341,15 @@
// At some point we want to make this plugable, hardcoding
// references like this is not very flexible.
if (opMetaData.isDocumentWrapped())
+ {
(new DynamicWrapperGenerator(getClassLoader())).generate(this);
+ // Initialize accessors
+ AccessorFactory factory = accessorFactoryCreator.create(this);
+ for (WrappedParameter wrapped : wrappedParameters)
+ wrapped.setAccessor(factory.create(wrapped));
+ }
+
// Initialize the cache
getJavaType();
}
@@ -389,15 +375,15 @@
// Wrapped type
for (WrappedParameter wrapped : wrappedParameters)
{
- String typeName = wrapped.type;
+ String typeName = wrapped.getType();
try
{
Class type = (typeName != null) ? JavaUtils.loadJavaType(typeName, loader)
- : ParameterWrapping.getWrappedType(wrapped.variable, wrapperType);
+ : ParameterWrapping.getWrappedType(wrapped.getVariable(), wrapperType);
if (type == null)
return false;
- if (! matchParameter(method, wrapped.index, type, matches, exact, wrapped.holder))
+ if (! matchParameter(method, wrapped.getIndex(), type, matches, exact, wrapped.isHolder()))
return false;
}
catch (Exception ex)
@@ -410,6 +396,11 @@
return true;
}
+ public void setAccessorFactoryCreator(AccessorFactoryCreator accessorFactoryCreator)
+ {
+ this.accessorFactoryCreator = accessorFactoryCreator;
+ }
+
public String toString()
{
boolean isReturn = (opMetaData.getReturnParameter() == this);
Added: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/WrappedParameter.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/WrappedParameter.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/WrappedParameter.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.metadata;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.utils.IOUtils;
+
+/**
+ * WrappedParameter represents a document/literal wrapped parameter.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WrappedParameter
+{
+ public static final int RETURN = -1;
+ private QName name;
+ private String type;
+ private String[] typeArguments;
+ private String variable;
+ private boolean holder = false;
+ private int index = -2;
+ private Accessor accessor;
+
+ public static interface AccessorFactory
+ {
+ public Accessor create(WrappedParameter parameter);
+ }
+
+ public static interface Accessor
+ {
+ public void set(Object bean, Object value);
+ public Object get(Object bean);
+ }
+
+ public WrappedParameter(QName name, String type, String variable, int index)
+ {
+ this.setName(name);
+ this.setType(type);
+ this.setVariable(variable);
+ this.setIndex(index);
+ }
+
+ public Accessor accessor()
+ {
+ return accessor;
+ }
+
+ public void setName(QName name)
+ {
+ this.name = name;
+ }
+
+ public QName getName()
+ {
+ return name;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setTypeArguments(String[] typeArguments)
+ {
+ this.typeArguments = typeArguments;
+ }
+
+ public String[] getTypeArguments()
+ {
+ return typeArguments;
+ }
+
+ public void setVariable(String variable)
+ {
+ this.variable = variable;
+ }
+
+ public String getVariable()
+ {
+ return variable;
+ }
+
+ public void setHolder(boolean holder)
+ {
+ this.holder = holder;
+ }
+
+ public boolean isHolder()
+ {
+ return holder;
+ }
+
+ public void setIndex(int index)
+ {
+ this.index = index;
+ }
+
+ public int getIndex()
+ {
+ return index;
+ }
+
+ void setAccessor(Accessor accessor)
+ {
+ this.accessor = accessor;
+ }
+
+ public String toString()
+ {
+ return "[name = " + getName() + ", type = " + getType() + ", typeArgs = " + IOUtils.printArray(getTypeArguments()) + ", variable = " + getVariable() + ", index = " + getIndex() + "]";
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/WrappedParameter.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.acessor;
+
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.QName;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.jboss.ws.metadata.WrappedParameter;
+import org.jboss.ws.metadata.ParameterMetaData.AccessorFactoryCreator;
+import org.jboss.ws.metadata.WrappedParameter.Accessor;
+import org.jboss.ws.metadata.WrappedParameter.AccessorFactory;
+
+import com.sun.xml.bind.api.AccessorException;
+import com.sun.xml.bind.api.JAXBRIContext;
+import com.sun.xml.bind.api.RawAccessor;
+
+/**
+ * A JAXB object accessor.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@SuppressWarnings("unchecked")
+public class JAXBAccessor implements Accessor
+{
+ private RawAccessor accessor;
+
+ public static AccessorFactoryCreator FACTORY_CREATOR = new AccessorFactoryCreator()
+ {
+ public AccessorFactory create(ParameterMetaData parameter)
+ {
+ final Class clazz = parameter.getJavaType();
+ final JAXBRIContext ctx;
+
+ try
+ {
+ ctx = (JAXBRIContext) JAXBRIContext.newInstance(new Class[]{clazz});
+ }
+ catch (JAXBException e)
+ {
+ WSException ex = new WSException(e.getMessage());
+ ex.setStackTrace(e.getStackTrace());
+ throw ex;
+ }
+
+ return new AccessorFactory()
+ {
+ public Accessor create(WrappedParameter parameter)
+ {
+ RawAccessor<Object,Object> accessor;
+ try
+ {
+ QName name = parameter.getName();
+ accessor = ctx.getElementPropertyAccessor(clazz, name.getNamespaceURI(), name.getLocalPart());
+ }
+ catch (Throwable t)
+ {
+ WSException ex = new WSException(t.getMessage());
+ ex.setStackTrace(t.getStackTrace());
+ throw ex;
+ }
+
+ if (accessor == null)
+ throw new IllegalStateException("Could not obtain accessor for parameter: " + parameter);
+
+ return new JAXBAccessor(accessor);
+ }
+ };
+ }
+ };
+
+ private JAXBAccessor(RawAccessor accessor)
+ {
+ this.accessor = accessor;
+ }
+
+ public Object get(Object bean)
+ {
+ try
+ {
+ return accessor.get(bean);
+ }
+ catch (AccessorException a)
+ {
+ WSException ex = new WSException(a.getMessage());
+ ex.setStackTrace(a.getStackTrace());
+ throw ex;
+ }
+ }
+
+ public void set(Object bean, Object value)
+ {
+ try
+ {
+ accessor.set(bean, value);
+ }
+ catch (AccessorException a)
+ {
+ WSException ex = new WSException(a.getMessage());
+ ex.setStackTrace(a.getStackTrace());
+ throw ex;
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/JAXBAccessor.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/ReflectiveMethodAccessor.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/ReflectiveMethodAccessor.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/ReflectiveMethodAccessor.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.metadata.acessor;
+
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.ParameterMetaData;
+import org.jboss.ws.metadata.WrappedParameter;
+import org.jboss.ws.metadata.ParameterMetaData.AccessorFactoryCreator;
+import org.jboss.ws.metadata.WrappedParameter.Accessor;
+import org.jboss.ws.metadata.WrappedParameter.AccessorFactory;
+
+/**
+ * A simple JavaBean accessor that uses ordinary reflection.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+@SuppressWarnings("unchecked")
+public class ReflectiveMethodAccessor implements Accessor
+{
+ private Method getter;
+ private Method setter;
+
+ public static AccessorFactoryCreator FACTORY_CREATOR = new AccessorFactoryCreator()
+ {
+ public AccessorFactory create(ParameterMetaData parameter)
+ {
+ final Class clazz = parameter.getJavaType();
+
+ return new AccessorFactory()
+ {
+ public Accessor create(WrappedParameter parameter)
+ {
+ try
+ {
+ PropertyDescriptor pd = new PropertyDescriptor(parameter.getVariable(), clazz);
+ return new ReflectiveMethodAccessor(pd.getReadMethod(), pd.getWriteMethod());
+ }
+ catch (Throwable t)
+ {
+ WSException ex = new WSException(t.getMessage());
+ ex.setStackTrace(t.getStackTrace());
+ throw ex;
+ }
+ }
+ };
+ }
+ };
+
+ private ReflectiveMethodAccessor(Method getter, Method setter)
+ {
+ this.getter = getter;
+ this.setter = setter;
+ }
+
+ public Object get(Object bean)
+ {
+ try
+ {
+ return getter.invoke(bean);
+ }
+ catch (Throwable e)
+ {
+ WSException ex = new WSException(e.getMessage());
+ ex.setStackTrace(ex.getStackTrace());
+ throw ex;
+ }
+ }
+
+ public void set(Object bean, Object value)
+ {
+ try
+ {
+ setter.invoke(bean, value);
+ }
+ catch (Throwable e)
+ {
+ WSException ex = new WSException(e.getMessage());
+ ex.setStackTrace(ex.getStackTrace());
+ throw ex;
+ }
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/main/java/org/jboss/ws/metadata/acessor/ReflectiveMethodAccessor.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/SourceWrapperGenerator.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -37,7 +37,7 @@
import org.jboss.ws.metadata.FaultMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.utils.JavaUtils;
import com.sun.codemodel.JAnnotationArrayMember;
@@ -88,7 +88,7 @@
addClassAnnotations(clazz, pmd.getXmlName(), pmd.getXmlType(), null);
for (WrappedParameter wrapped : wrappedParameters)
{
- addProperty(clazz, wrapped.type, wrapped.name, wrapped.variable);
+ addProperty(clazz, wrapped.getType(), wrapped.getName(), wrapped.getVariable());
}
}
catch (Exception e)
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/JavaToWSDLHelper.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -48,7 +48,7 @@
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
import org.jboss.ws.metadata.ServerEndpointMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.metadata.jaxrpcmapping.ExceptionMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
@@ -166,7 +166,7 @@
Map<String, QName> map = new LinkedHashMap<String, QName>(wrappedParameters.size());
for (WrappedParameter param : wrappedParameters)
- map.put(param.variable, param.name);
+ map.put(param.getVariable(), param.getName());
return map;
}
@@ -231,8 +231,8 @@
List<WrappedParameter> wrappedParameters = param.getWrappedParameters();
for (WrappedParameter wrapped : wrappedParameters)
{
- String type = JavaUtils.convertJVMNameToSourceName(wrapped.type, endpoint.getClassLoader());
- String name = wrapped.name.getLocalPart();
+ String type = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), endpoint.getClassLoader());
+ String name = wrapped.getName().getLocalPart();
buildParamMapping(methodMapping, interfaceName, operation, name, type, "IN", false, i++);
}
@@ -252,8 +252,8 @@
if (isWrapped)
{
WrappedParameter wrappedParameter = returnParam.getWrappedParameters().get(0);
- name = wrappedParameter.name.getLocalPart();
- type = wrappedParameter.type;
+ name = wrappedParameter.getName().getLocalPart();
+ type = wrappedParameter.getType();
}
else
{
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/helpers/ToolsHelper.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -47,7 +47,7 @@
import org.jboss.ws.metadata.ParameterMetaData;
import org.jboss.ws.metadata.ServiceMetaData;
import org.jboss.ws.metadata.UnifiedMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.jaxrpcmapping.JavaXmlTypeMapping;
import org.jboss.ws.metadata.wsdl.NCName;
@@ -244,8 +244,8 @@
List<VAR> vars = new ArrayList<VAR>();
for (WrappedParameter wrapped : wrappedParameters)
{
- String typeName = JavaUtils.convertJVMNameToSourceName(wrapped.type, classLoader);
- vars.add(new VAR(wrapped.variable, typeName, false));
+ String typeName = JavaUtils.convertJVMNameToSourceName(wrapped.getType(), classLoader);
+ vars.add(new VAR(wrapped.getVariable(), typeName, false));
}
JavaWriter writer = new JavaWriter();
Modified: branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java
===================================================================
--- branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/main/java/org/jboss/ws/tools/metadata/ReflectiveMetaDataBuilder.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -39,7 +39,7 @@
import org.jboss.ws.metadata.FaultMetaData;
import org.jboss.ws.metadata.OperationMetaData;
import org.jboss.ws.metadata.ParameterMetaData;
-import org.jboss.ws.metadata.ParameterMetaData.WrappedParameter;
+import org.jboss.ws.metadata.WrappedParameter;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.Configuration.OperationConfig;
Modified: branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml
===================================================================
--- branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/ant/build-jars-jaxws.xml 2006-11-02 16:50:38 UTC (rev 1344)
@@ -415,6 +415,7 @@
<war warfile="${build.test.dir}/libs/jaxws-webserviceref.war" webxml="${build.test.dir}/resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpoint.class"/>
</classes>
</war>
<jar destfile="${build.test.dir}/libs/jaxws-webserviceref-client.jar">
@@ -462,6 +463,15 @@
</metainf>
</jar>
+ <!-- jaxws-wrapped-accessor -->
+ <war warfile="${build.test.dir}/libs/jaxws-wrapped-accessor.war" webxml="${build.test.dir}/resources/jaxws/wrapped/accessor/WEB-INF/web.xml">
+ <classes dir="${build.test.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.class"/>
+ <include name="org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.class"/>
+ <include name="org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/*"/>
+ </classes>
+ </war>
+
<!-- jaxws-wsaddressing-action -->
<war warfile="${build.test.dir}/libs/jaxws-wsaddressing-action-rpc.war" webxml="${build.test.dir}/resources/jaxws/wsaddressing/action/WEB-INF/web.xml">
<classes dir="${build.test.dir}/classes">
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/jsr181/soapbinding/JSR181SOAPBindingTestCase.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -165,9 +165,9 @@
" <env:Header/>" +
" <env:Body>" +
" <ns1:SubmitPO xmlns:ns1='" + targetNS + "'>" +
- " <ns1:PurchaseOrder>" +
+ " <PurchaseOrder>" +
" <ns1:product>Ferrari</ns1:product>" +
- " </ns1:PurchaseOrder>" +
+ " </PurchaseOrder>" +
" </ns1:SubmitPO>" +
" </env:Body>" +
"</env:Envelope>";
@@ -183,7 +183,7 @@
NameImpl name = new NameImpl(new QName(targetNS, "SubmitPOResponse"));
SOAPElement soapElement = (SOAPElement)resMsg.getSOAPBody().getChildElements(name).next();
- soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "PurchaseOrderAck"))).next();
+ soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName("PurchaseOrderAck"))).next();
soapElement = (SOAPElement)soapElement.getChildElements(new NameImpl(new QName(targetNS, "product"))).next();
assertEquals("Ferrari", soapElement.getValue());
}
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXB.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXB.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXB.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -37,9 +37,9 @@
{
@WebMethod
- @WebResult(name = "result")
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "result")
@RequestWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.Echo")
@ResponseWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.EchoResponse")
- public String echo(@WebParam(name="String_1") String string1);
+ public String echo(@WebParam(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name="String_1") String string1);
}
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXBImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXBImpl.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointJAXBImpl.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -40,10 +40,10 @@
private static Logger log = Logger.getLogger(SOAPEndpointJAXBImpl.class);
@WebMethod
- @WebResult(name = "result")
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "result")
@RequestWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.Echo")
@ResponseWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.EchoResponse")
- public String echo(@WebParam(name="String_1") String msg)
+ public String echo(@WebParam(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name="String_1") String msg)
{
log.info("echo: " + msg);
return msg + ":endpoint";
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSource.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSource.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSource.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -37,9 +37,9 @@
{
@WebMethod
- @WebResult(name = "result")
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "result")
@RequestWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.Echo")
@ResponseWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.EchoResponse")
- public String echo(@WebParam(name = "String_1") String string1);
+ public String echo(@WebParam(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name = "String_1") String string1);
}
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSourceImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSourceImpl.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/logicalhandler/SOAPEndpointSourceImpl.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -40,10 +40,10 @@
private static Logger log = Logger.getLogger(SOAPEndpointSourceImpl.class);
@WebMethod
- @WebResult(name="result")
+ @WebResult(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name="result")
@RequestWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.Echo")
@ResponseWrapper(className = "org.jboss.test.ws.jaxws.logicalhandler.EchoResponse")
- public String echo(@WebParam(name="String_1")String msg)
+ public String echo(@WebParam(targetNamespace = "http://org.jboss.ws/jaxws/logicalhandler", name="String_1")String msg)
{
log.info("echo: " + msg);
return msg + ":endpoint";
Modified: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -21,7 +21,6 @@
*/
package org.jboss.test.ws.jaxws.webserviceref;
-import javax.jws.WebMethod;
import javax.jws.WebService;
import org.jboss.logging.Logger;
@@ -32,13 +31,12 @@
* @author Thomas.Diesler(a)jboss.org
* @since 23-Oct-2006
*/
-@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/wsref")
-public class TestEndpointImpl
+@WebService(endpointInterface="org.jboss.test.ws.jaxws.webserviceref.TestEndpoint")
+public class TestEndpointImpl implements TestEndpoint
{
// Provide logging
private static Logger log = Logger.getLogger(TestEndpointImpl.class);
-
- @WebMethod
+
public String echo(String input)
{
log.info(input);
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor;
+import javax.jws.WebService;
+
+@WebService
+public interface Accessor
+{
+ public String fieldAccessor(String one, int two);
+ public String methodAccessor(String one, int two);
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/Accessor.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor;
+
+import javax.jws.WebService;
+
+@WebService(endpointInterface="org.jboss.test.ws.jaxws.wrapped.accessor.Accessor")
+public class AccessorImpl implements Accessor
+{
+ public String fieldAccessor(String one, int two)
+ {
+ return one + two;
+ }
+
+ public String methodAccessor(String one, int two)
+ {
+ return one + two;
+ }
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorImpl.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorTestCase.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorTestCase.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorTestCase.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test different JAXB accesor types.
+ *
+ * @author <a href="jason.greene(a)jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class AccessorTestCase extends JBossWSTest
+{
+ private String targetNS = "http://accessor.wrapped.jaxws.ws.test.jboss.org/jaws";
+ private Accessor proxy;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(AccessorTestCase.class, "jaxws-wrapped-accessor.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ QName serviceName = new QName(targetNS, "AccessorService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-wrapped-accessor/AccessorService?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (Accessor) service.getPort(Accessor.class);
+ }
+
+
+ public void testFieldAccessor() throws Exception
+ {
+ assertEquals("testing123", proxy.fieldAccessor("testing", 123));
+ }
+
+ public void testMethodAccessor() throws Exception
+ {
+ assertEquals("moretesting456", proxy.fieldAccessor("moretesting", 456));
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/AccessorTestCase.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessor.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessor.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessor.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "fieldAccessor", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "fieldAccessor", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/", propOrder = {
+ "arg0",
+ "arg1"
+})
+public class FieldAccessor {
+
+ @XmlElement(name = "arg0", namespace = "")
+ private String arg0;
+ @XmlElement(name = "arg1", namespace = "")
+ private int arg1;
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessor.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessorResponse.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessorResponse.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessorResponse.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "fieldAccessorResponse", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "fieldAccessorResponse", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+public class FieldAccessorResponse {
+
+ @XmlElement(name = "return", namespace = "")
+ private String _return;
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/FieldAccessorResponse.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessor.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessor.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessor.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "methodAccessor", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.PROPERTY)
+@XmlType(name = "methodAccessor", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/", propOrder = { "arg0", "arg1" })
+public class MethodAccessor
+{
+ private String renamed0;
+ private int renamed1;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ @XmlElement(name = "arg0", namespace = "")
+ public String getArg0()
+ {
+ return this.renamed0;
+ }
+
+ /**
+ *
+ * @param arg0
+ * the value for the arg0 property
+ */
+ public void setArg0(String arg0)
+ {
+ this.renamed0 = arg0;
+ }
+
+ /**
+ *
+ * @return
+ * returns int
+ */
+ @XmlElement(name = "arg1", namespace = "")
+ public int getArg1()
+ {
+ return this.renamed1;
+ }
+
+ /**
+ *
+ * @param arg1
+ * the value for the arg1 property
+ */
+ public void setArg1(int arg1)
+ {
+ this.renamed1 = arg1;
+ }
+}
\ No newline at end of file
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessor.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessorResponse.java
===================================================================
--- branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessorResponse.java 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessorResponse.java 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wrapped.accessor.jaxws;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "methodAccessorResponse", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+(a)XmlAccessorType(XmlAccessType.PROPERTY)
+@XmlType(name = "methodAccessorResponse", namespace = "http://accessor.wrapped.jaxws.ws.test.jboss.org/")
+public class MethodAccessorResponse {
+
+ private String renamed;
+
+ /**
+ *
+ * @return
+ * returns String
+ */
+ @XmlElement(name = "return", namespace = "")
+ public String get_return() {
+ return this.renamed;
+ }
+
+ /**
+ *
+ * @param _return
+ * the value for the _return property
+ */
+ public void set_return(String _return) {
+ this.renamed = _return;
+ }
+}
Property changes on: branches/JEE5_TCK/src/test/java/org/jboss/test/ws/jaxws/wrapped/accessor/jaxws/MethodAccessorResponse.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/web.xml
===================================================================
--- branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/web.xml 2006-11-02 15:17:07 UTC (rev 1343)
+++ branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/web.xml 2006-11-02 16:50:38 UTC (rev 1344)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>AccessorService</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.wrapped.accessor.AccessorImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AccessorService</servlet-name>
+ <url-pattern>/AccessorService</url-pattern>
+ </servlet-mapping>
+</web-app>
Property changes on: branches/JEE5_TCK/src/test/resources/jaxws/wrapped/accessor/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 2 months
JBossWS SVN: r1343 - in trunk/src/main: java/org/jboss/ws/integration/jboss50 resources/jbossws.deployer/META-INF
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-02 10:17:07 -0500 (Thu, 02 Nov 2006)
New Revision: 1343
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
Log:
Tmporarily install webapp classloaader
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 14:25:10 UTC (rev 1342)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 15:17:07 UTC (rev 1343)
@@ -23,12 +23,24 @@
//$Id$
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.Iterator;
import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
import javax.jws.WebService;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.classloader.ClassLoaderFactory;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.logging.Logger;
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
@@ -61,6 +73,31 @@
}
@Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ boolean removeLoader = false;
+ try
+ {
+ unit.getClassLoader();
+ }
+ catch (Exception ex)
+ {
+ unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
+ removeLoader = true;
+ }
+
+ try
+ {
+ super.deploy(unit);
+ }
+ finally
+ {
+ if (removeLoader == true)
+ unit.getDeploymentContext().removeClassLoader();
+ }
+ }
+
+ @Override
public boolean isRelevant(DeploymentUnit unit)
{
boolean isRelevant = false;
@@ -116,4 +153,99 @@
}
return false;
}
+
+ static class WebAppClassLoaderFactory implements ClassLoaderFactory
+ {
+ // provide logging
+ private static Logger log = Logger.getLogger(WebAppClassLoaderFactory.class);
+
+ private ClassLoader classLoader;
+
+ public ClassLoader createClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("createClassLoader: " + context.getRoot());
+
+ ArrayList<URL> list = new ArrayList<URL>();
+
+ URL warURL = context.getRoot().toURL();
+ String externalForm = warURL.toExternalForm();
+
+ if (externalForm.endsWith("!/"))
+ {
+ String fileName = warURL.getFile();
+ if (fileName.indexOf("!") > 0)
+ fileName = fileName.substring(0, fileName.indexOf("!"));
+
+ try
+ {
+ URL url = new URL(fileName);
+ fileName = url.getFile();
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ File warFile = new File(fileName);
+ if (warFile.exists())
+ {
+ ZipFile zipFile = new ZipFile(warFile);
+ Enumeration en = zipFile.entries();
+ while (en.hasMoreElements())
+ {
+ ZipEntry entry = (ZipEntry)en.nextElement();
+ String entryName = entry.getName();
+ if (entryName.equals("WEB-INF/classes/"))
+ {
+ URL classesURL = new URL(externalForm + entryName);
+ list.add(classesURL);
+ }
+ if (entryName.startsWith("WEB-INF/lib") && entryName.endsWith(".jar"))
+ {
+ URL jarURL = new URL(externalForm + entryName);
+ list.add(jarURL);
+ }
+ }
+ }
+ else
+ {
+ log.warn("WAR file does not exist: " + warFile);
+ }
+ }
+ else
+ {
+ String path = warURL.getFile();
+
+ File classesDir = new File(path, "WEB-INF/classes");
+ if (classesDir.exists())
+ list.add(classesDir.toURL());
+
+ File libDir = new File(path, "WEB-INF/lib");
+ if (libDir.exists())
+ {
+ File[] jars = libDir.listFiles();
+ int length = jars != null ? jars.length : 0;
+ for (int j = 0; j < length; j++)
+ {
+ File jar = jars[j];
+ if (jar.getAbsolutePath().endsWith(".jar"))
+ {
+ list.add(jar.toURL());
+ }
+ }
+ }
+ }
+
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent);
+
+ return classLoader;
+ }
+
+ public void removeClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("removeClassLoader: " + context.getRoot());
+ this.classLoader = null;
+ }
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 14:25:10 UTC (rev 1342)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 15:17:07 UTC (rev 1343)
@@ -157,25 +157,7 @@
}
ClassLoader parent = Thread.currentThread().getContextClassLoader();
- classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent)
- {
- protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
- {
- try
- {
- Class clazz = findClass(name);
- if (resolve)
- {
- resolveClass(clazz);
- }
- return clazz;
- }
- catch (ClassNotFoundException e)
- {
- return getParent().loadClass(name);
- }
- }
- };
+ classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent);
return classLoader;
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-11-02 14:25:10 UTC (rev 1342)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-11-02 15:17:07 UTC (rev 1343)
@@ -28,6 +28,7 @@
import java.util.Map;
import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
import org.jboss.metadata.web.ServletMapping;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
@@ -44,7 +45,7 @@
UnifiedWebMetaData umd = new UnifiedWebMetaData();
umd.setContextRoot(wmd.getContextRoot());
umd.setServletMappings(getServletMappings(wmd));
- umd.setServletClassMap(wmd.getServletClassMap());
+ umd.setServletClassMap(getServletClassMap(wmd));
umd.setConfigName(wmd.getConfigName());
umd.setConfigFile(wmd.getConfigFile());
umd.setContextLoader(wmd.getContextLoader());
@@ -64,4 +65,16 @@
}
return mappings;
}
+
+ private static Map<String, String> getServletClassMap(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServlets().iterator();
+ while(it.hasNext())
+ {
+ Servlet servlet = (Servlet)it.next();
+ mappings.put(servlet.getName(), servlet.getServletClass());
+ }
+ return mappings;
+ }
}
Modified: trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
===================================================================
--- trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-02 14:25:10 UTC (rev 1342)
+++ trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-02 15:17:07 UTC (rev 1343)
@@ -18,6 +18,7 @@
<depends>JBossWebAppParsingDeployer</depends>
</bean>
+ <!--
<bean name="WebAppClassLoaderDeployer" class="org.jboss.ws.integration.jboss50.WebAppClassLoaderDeployer">
<install bean="MainDeployer" method="addDeployer">
<parameter>
@@ -30,6 +31,7 @@
</parameter>
</uninstall>
</bean>
+ -->
<bean name="JAXWSDeployerJSE" class="org.jboss.ws.integration.jboss50.JAXWSDeployerJSE">
<install bean="MainDeployer" method="addDeployer">
@@ -43,7 +45,6 @@
</parameter>
</uninstall>
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
- <depends>WebAppClassLoaderDeployer</depends>
<depends>JBossWebAppParsingDeployer</depends>
</bean>
18 years, 2 months
JBossWS SVN: r1342 - in trunk/src/main: java/org/jboss/ws/integration/jboss50 resources/jbossws.deployer/META-INF
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-02 09:25:10 -0500 (Thu, 02 Nov 2006)
New Revision: 1342
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
Log:
JAXWS JSE deployer, more to come
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -26,8 +26,10 @@
import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.deployment.AbstractServiceEndpointPublisher;
import org.jboss.ws.deployment.ServiceEndpointDeployer;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
import org.jboss.ws.server.KernelLocator;
@@ -40,10 +42,22 @@
*/
public abstract class AbstractDeployer extends AbstractSimpleDeployer
{
+ private Kernel kernel;
+
+ public Kernel getKernel()
+ {
+ return kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ this.kernel = kernel;
+ }
+
@Override
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- if (isWebserviceDeployment(unit))
+ if (isRelevant(unit))
{
UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
String attachmentKey = getClass().getName() + ":" + unit.getName();
@@ -88,6 +102,8 @@
}
}
+ protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
+
protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
{
log.debug("createServiceEndpoint: " + udi.getCanonicalName());
@@ -119,10 +135,13 @@
return (ServiceEndpointDeployer)entry.getTarget();
}
- protected abstract boolean isWebserviceDeployment(DeploymentUnit unit);
-
- protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
-
+ protected ServiceEndpointPublisher getServiceEndpointPublisher()
+ {
+ KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
+ return (ServiceEndpointPublisher)entry.getTarget();
+ }
+
protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentUnit unit)
{
String attachmentKey = getClass().getName() + ":" + unit.getName();
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -60,12 +60,5 @@
super.destroyServiceEndpoint(udi, unit);
}
- protected ServiceEndpointPublisher getServiceEndpointPublisher()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
- return (ServiceEndpointPublisher)entry.getTarget();
- }
-
protected abstract URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit);
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -22,10 +22,12 @@
package org.jboss.ws.integration.jboss50;
import java.net.URL;
+import java.util.Set;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.logging.Logger;
+import org.jboss.metadata.WebMetaData;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
// $Id$
@@ -92,12 +94,15 @@
{
metaData = ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData(unit);
}
- /*
- if (metaData instanceof WebMetaData)
+ else
{
- retMetaData = WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
+ {
+ metaData = allMetaData.iterator().next();
+ metaData = WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
+ }
}
- */
return metaData;
}
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -53,9 +53,9 @@
}
@Override
- protected boolean isWebserviceDeployment(DeploymentUnit unit)
+ public boolean isRelevant(DeploymentUnit unit)
{
- boolean isWebserviceDeployment = false;
+ boolean isRelevant = false;
Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
if (ejb3Deployment != null)
@@ -66,13 +66,13 @@
EJBContainer container = (EJBContainer)it.next();
if (container instanceof StatelessContainer && container.resolveAnnotation(WebService.class) != null)
{
- isWebserviceDeployment = true;
+ isRelevant = true;
break;
}
}
}
- return isWebserviceDeployment;
+ return isRelevant;
}
protected URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit)
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -23,29 +23,35 @@
//$Id$
-import java.net.URL;
import java.util.Iterator;
import java.util.Set;
import javax.jws.WebService;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.Servlet;
import org.jboss.ws.deployment.JSR181Deployment;
import org.jboss.ws.deployment.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.UnifiedMetaData;
/**
- * A deployer JAXWS EJB3 Endpoints
+ * A deployer JAXWS JSE Endpoints
*
* @author Thomas.Diesler(a)jboss.org
* @since 31-Oct-2005
*/
public class JAXWSDeployerJSE extends AbstractJSEDeployer
{
+ // The servlet init param in web.xml that is the service endpoint class
+ public static final String INIT_PARAM_SERVICE_ENDPOINT_IMPL = "ServiceEndpointImpl";
+
+ // The default relative order after the JBossWebAppParsingDeployer
+ public int getRelativeOrder()
+ {
+ return PARSER_DEPLOYER + 3;
+ }
+
@Override
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
{
@@ -55,16 +61,59 @@
}
@Override
- protected boolean isWebserviceDeployment(DeploymentUnit unit)
+ public boolean isRelevant(DeploymentUnit unit)
{
- boolean isWebserviceDeployment = false;
+ boolean isRelevant = false;
Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
if (allMetaData.size() > 0)
{
- log.debug("unit: " + unit.getName());
+ WebMetaData webMetaData = allMetaData.iterator().next();
+ if (allMetaData.size() > 1)
+ log.warn("More than one WebMetaData not supported");
+
+ try
+ {
+ ClassLoader anLoader = unit.getClassLoader();
+ String serviceEndpointServlet = getServiceEndpointPublisher().getServiceEndpointServlet();
+
+ Iterator it = webMetaData.getServlets().iterator();
+ while (it.hasNext())
+ {
+ Servlet servlet = (Servlet)it.next();
+ String beanName = servlet.getServletClass();
+ Class<?> servletClass = anLoader.loadClass(beanName);
+ if (servletClass.isAnnotationPresent(WebService.class))
+ {
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet) == false)
+ {
+ servlet.setServletClass(serviceEndpointServlet);
+ NameValuePair initParam = new NameValuePair(INIT_PARAM_SERVICE_ENDPOINT_IMPL, beanName);
+ servlet.addInitParam(initParam);
+ }
+ isRelevant = true;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot process web deployment", ex);
+ }
}
- return isWebserviceDeployment;
+ return isRelevant;
}
+
+ private boolean isAlreadyModified(Servlet servlet)
+ {
+ Iterator itParams = servlet.getInitParams().iterator();
+ while (itParams.hasNext())
+ {
+ NameValuePair pair = (NameValuePair)itParams.next();
+ if (INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
+ return true;
+ }
+ return false;
+ }
}
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointGeneratorEJB.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -56,7 +56,7 @@
public URL generatWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit)
{
- // Collect the list of PortComponentMetaData
+ // Collect the list of EndpointMetaData
List<EndpointMetaData> epMetaDataList = new ArrayList<EndpointMetaData>();
for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
{
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.classloader.ClassLoaderFactory;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.logging.Logger;
+
+/**
+ * A deployer that adds a webapp class loader to the depployment unit
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class WebAppClassLoaderDeployer extends AbstractSimpleDeployer
+{
+ // The default relative order after the JBossWebAppParsingDeployer
+ public int getRelativeOrder()
+ {
+ return PARSER_DEPLOYER + 2;
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ ClassLoader classLoader = null;
+ try
+ {
+ // This throws a RTE if the loader was not set
+ classLoader = unit.getClassLoader();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+
+
+ if (classLoader == null)
+ {
+ unit.getDeploymentContext().createClassLoader(new WebAppClassLoaderFactory());
+ }
+ }
+
+ static class WebAppClassLoaderFactory implements ClassLoaderFactory
+ {
+ // provide logging
+ private static Logger log = Logger.getLogger(WebAppClassLoaderFactory.class);
+
+ private ClassLoader classLoader;
+
+ public ClassLoader createClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("createClassLoader: " + context.getRoot());
+
+ ArrayList<URL> list = new ArrayList<URL>();
+
+ URL warURL = context.getRoot().toURL();
+ String externalForm = warURL.toExternalForm();
+
+ if (externalForm.endsWith("!/"))
+ {
+ String fileName = warURL.getFile();
+ if (fileName.indexOf("!") > 0)
+ fileName = fileName.substring(0, fileName.indexOf("!"));
+
+ try
+ {
+ URL url = new URL(fileName);
+ fileName = url.getFile();
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ File warFile = new File(fileName);
+ if (warFile.exists())
+ {
+ ZipFile zipFile = new ZipFile(warFile);
+ Enumeration en = zipFile.entries();
+ while (en.hasMoreElements())
+ {
+ ZipEntry entry = (ZipEntry)en.nextElement();
+ String entryName = entry.getName();
+ if (entryName.equals("WEB-INF/classes/"))
+ {
+ URL classesURL = new URL(externalForm + entryName);
+ list.add(classesURL);
+ }
+ if (entryName.startsWith("WEB-INF/lib") && entryName.endsWith(".jar"))
+ {
+ URL jarURL = new URL(externalForm + entryName);
+ list.add(jarURL);
+ }
+ }
+ }
+ else
+ {
+ log.warn("WAR file does not exist: " + warFile);
+ }
+ }
+ else
+ {
+ String path = warURL.getFile();
+
+ File classesDir = new File(path, "WEB-INF/classes");
+ if (classesDir.exists())
+ list.add(classesDir.toURL());
+
+ File libDir = new File(path, "WEB-INF/lib");
+ if (libDir.exists())
+ {
+ File[] jars = libDir.listFiles();
+ int length = jars != null ? jars.length : 0;
+ for (int j = 0; j < length; j++)
+ {
+ File jar = jars[j];
+ if (jar.getAbsolutePath().endsWith(".jar"))
+ {
+ list.add(jar.toURL());
+ }
+ }
+ }
+ }
+
+ ClassLoader parent = Thread.currentThread().getContextClassLoader();
+ classLoader = new URLClassLoader(list.toArray(new URL[list.size()]), parent)
+ {
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
+ {
+ try
+ {
+ Class clazz = findClass(name);
+ if (resolve)
+ {
+ resolveClass(clazz);
+ }
+ return clazz;
+ }
+ catch (ClassNotFoundException e)
+ {
+ return getParent().loadClass(name);
+ }
+ }
+ };
+
+ return classLoader;
+ }
+
+ public void removeClassLoader(DeploymentContext context) throws Exception
+ {
+ log.debug("removeClassLoader: " + context.getRoot());
+ this.classLoader = null;
+ }
+ }
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebAppClassLoaderDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java 2006-11-02 14:25:10 UTC (rev 1342)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.ServletMapping;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class WebMetaDataAdaptor
+{
+ public static UnifiedWebMetaData buildUnifiedWebMetaData(WebMetaData wmd)
+ {
+ UnifiedWebMetaData umd = new UnifiedWebMetaData();
+ umd.setContextRoot(wmd.getContextRoot());
+ umd.setServletMappings(getServletMappings(wmd));
+ umd.setServletClassMap(wmd.getServletClassMap());
+ umd.setConfigName(wmd.getConfigName());
+ umd.setConfigFile(wmd.getConfigFile());
+ umd.setContextLoader(wmd.getContextLoader());
+ umd.setSecurityDomain(wmd.getSecurityDomain());
+ //umd.setWsdlPublishLocationMap(wmd.getWsdlPublishLocationMap());
+ return umd;
+ }
+
+ private static Map<String, String> getServletMappings(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServletMappings().iterator();
+ while(it.hasNext())
+ {
+ ServletMapping sm = (ServletMapping)it.next();
+ mappings.put(sm.getName(), sm.getUrlPattern());
+ }
+ return mappings;
+ }
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebMetaDataAdaptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
===================================================================
--- trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-02 10:08:07 UTC (rev 1341)
+++ trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-02 14:25:10 UTC (rev 1342)
@@ -13,10 +13,24 @@
<this/>
</parameter>
</uninstall>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
<depends>EJBRegistrationDeployer</depends>
- <depends>WarDeployer</depends>
+ <depends>JBossWebAppParsingDeployer</depends>
</bean>
+ <bean name="WebAppClassLoaderDeployer" class="org.jboss.ws.integration.jboss50.WebAppClassLoaderDeployer">
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ </bean>
+
<bean name="JAXWSDeployerJSE" class="org.jboss.ws.integration.jboss50.JAXWSDeployerJSE">
<install bean="MainDeployer" method="addDeployer">
<parameter>
@@ -28,7 +42,9 @@
<this/>
</parameter>
</uninstall>
- <depends>WarDeployer</depends>
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ <depends>WebAppClassLoaderDeployer</depends>
+ <depends>JBossWebAppParsingDeployer</depends>
</bean>
</deployment>
\ No newline at end of file
18 years, 2 months
JBossWS SVN: r1341 - branches/jbossws-1.0/docs/user-guide/project/en/modules
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2006-11-02 05:08:07 -0500 (Thu, 02 Nov 2006)
New Revision: 1341
Modified:
branches/jbossws-1.0/docs/user-guide/project/en/modules/introduction.xml
Log:
Spelling mistake.
Modified: branches/jbossws-1.0/docs/user-guide/project/en/modules/introduction.xml
===================================================================
--- branches/jbossws-1.0/docs/user-guide/project/en/modules/introduction.xml 2006-11-01 20:15:06 UTC (rev 1340)
+++ branches/jbossws-1.0/docs/user-guide/project/en/modules/introduction.xml 2006-11-02 10:08:07 UTC (rev 1341)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="introduction">
- <title>Introdcution</title>
+ <title>Introduction</title>
<sect1 id="features">
<title>Features</title>
18 years, 2 months
JBossWS SVN: r1340 - in trunk/src: main/java/org/jboss/ws/integration/jboss50 main/resources/jbossws.deployer/META-INF test/ant test/java/org/jboss/test/ws/jaxws/jsr181/webservice
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-01 15:15:06 -0500 (Wed, 01 Nov 2006)
New Revision: 1340
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
Removed:
trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
trunk/src/test/ant/build-jars-jaxws.xml
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java
Log:
JAXWS deployer JSE, first cut
Copied: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java (from rev 1335, trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java)
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java 2006-10-31 17:39:12 UTC (rev 1335)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.deployment.ServiceEndpointDeployer;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.server.KernelLocator;
+
+/**
+ * An abstract web service deployer
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public abstract class AbstractDeployer extends AbstractSimpleDeployer
+{
+ @Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ if (isWebserviceDeployment(unit))
+ {
+ UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
+ String attachmentKey = getClass().getName() + ":" + unit.getName();
+ unit.addAttachment(attachmentKey, udi, UnifiedDeploymentInfo.class);
+
+ try
+ {
+ createServiceEndpoint(udi, unit);
+
+ startServiceEndpoint(udi, unit);
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot deploy web service: " + unit.getName(), ex);
+ throw new DeploymentException (ex);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit)
+ {
+ UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(unit);
+ if (udi != null)
+ {
+ try
+ {
+ stopServiceEndpoint(udi, unit);
+
+ destroyServiceEndpoint(udi, unit);
+ }
+ catch (RuntimeException rte)
+ {
+ log.error("Cannot undeploy web service: " + udi.getCanonicalName(), rte);
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot undeploy web service: " + udi.getCanonicalName(), ex);
+ throw new RuntimeException (ex);
+ }
+ }
+ }
+
+ protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ log.debug("createServiceEndpoint: " + udi.getCanonicalName());
+ getServiceEndpointDeployer().create(udi);
+ }
+
+ protected void startServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ log.debug("startServiceEndpoint: " + udi.getCanonicalName());
+ getServiceEndpointDeployer().start(udi);
+ }
+
+ protected void stopServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ log.debug("stopServiceEndpoint: " + udi.getCanonicalName());
+ getServiceEndpointDeployer().stop(udi);
+ }
+
+ protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ log.debug("destroyServiceEndpoint: " + udi.getCanonicalName());
+ getServiceEndpointDeployer().destroy(udi);
+ }
+
+ protected ServiceEndpointDeployer getServiceEndpointDeployer()
+ {
+ KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(ServiceEndpointDeployer.BEAN_NAME);
+ return (ServiceEndpointDeployer)entry.getTarget();
+ }
+
+ protected abstract boolean isWebserviceDeployment(DeploymentUnit unit);
+
+ protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
+
+ protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentUnit unit)
+ {
+ String attachmentKey = getClass().getName() + ":" + unit.getName();
+ return (UnifiedDeploymentInfo)unit.getAttachment(attachmentKey, UnifiedDeploymentInfo.class);
+ }
+}
Copied: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java (from rev 1335, trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java)
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java 2006-10-31 17:39:12 UTC (rev 1335)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractEJBDeployer.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.deployment.AbstractServiceEndpointPublisher;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.UnifiedMetaData;
+import org.jboss.ws.server.KernelLocator;
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public abstract class AbstractEJBDeployer extends AbstractDeployer
+{
+ public static final String ENDPOINT_WAR_URL = "EJB_ENDPOINT_WAR_URL";
+
+ @Override
+ protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ super.createServiceEndpoint(udi, unit);
+ UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
+ URL warURL = generateWebDeployment(wsMetaData, unit);
+ udi.context.put(ENDPOINT_WAR_URL, warURL);
+ getServiceEndpointPublisher().publishServiceEndpoint(udi);
+ }
+
+ @Override
+ protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
+ {
+ getServiceEndpointPublisher().destroyServiceEndpoint(udi);
+ super.destroyServiceEndpoint(udi, unit);
+ }
+
+ protected ServiceEndpointPublisher getServiceEndpointPublisher()
+ {
+ KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
+ return (ServiceEndpointPublisher)entry.getTarget();
+ }
+
+ protected abstract URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit);
+}
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public abstract class AbstractJSEDeployer extends AbstractDeployer
+{
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/AbstractWebServiceDeployer.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50;
-
-//$Id$
-
-import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.deployment.ServiceEndpointDeployer;
-import org.jboss.ws.deployment.UnifiedDeploymentInfo;
-import org.jboss.ws.server.KernelLocator;
-
-/**
- * A deployer service that manages Web Services deployments
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public abstract class AbstractWebServiceDeployer extends AbstractSimpleDeployer
-{
- @Override
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (isWebserviceDeployment(unit))
- {
- UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
- unit.addAttachment(UnifiedDeploymentInfo.class, udi);
-
- try
- {
- createServiceEndpoint(udi, unit);
-
- startServiceEndpoint(udi, unit);
- }
- catch (Exception ex)
- {
- log.error("Cannot deploy web service: " + unit.getName(), ex);
- throw new DeploymentException (ex);
- }
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit)
- {
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(unit);
- if (udi != null)
- {
- try
- {
- stopServiceEndpoint(udi, unit);
-
- destroyServiceEndpoint(udi, unit);
- }
- catch (RuntimeException rte)
- {
- log.error("Cannot undeploy web service: " + udi.getCanonicalName(), rte);
- throw rte;
- }
- catch (Exception ex)
- {
- log.error("Cannot undeploy web service: " + udi.getCanonicalName(), ex);
- throw new RuntimeException (ex);
- }
- }
- }
-
- protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- log.debug("createServiceEndpoint: " + udi.getCanonicalName());
- getServiceEndpointDeployer().create(udi);
- }
-
- protected void startServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- log.debug("startServiceEndpoint: " + udi.getCanonicalName());
- getServiceEndpointDeployer().start(udi);
- }
-
- protected void stopServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- log.debug("stopServiceEndpoint: " + udi.getCanonicalName());
- getServiceEndpointDeployer().stop(udi);
- }
-
- protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- log.debug("destroyServiceEndpoint: " + udi.getCanonicalName());
- getServiceEndpointDeployer().destroy(udi);
- }
-
- protected ServiceEndpointDeployer getServiceEndpointDeployer()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry = registry.getEntry(ServiceEndpointDeployer.BEAN_NAME);
- return (ServiceEndpointDeployer)entry.getTarget();
- }
-
- protected abstract boolean isWebserviceDeployment(DeploymentUnit unit);
-
- protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit);
-
- protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentUnit unit)
- {
- return (UnifiedDeploymentInfo)unit.getAttachment(UnifiedDeploymentInfo.class);
- }
-}
Copied: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java (from rev 1335, trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java)
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java 2006-10-31 17:39:12 UTC (rev 1335)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerEJB3.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.net.URL;
+import java.util.Iterator;
+
+import javax.jws.WebService;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.ws.deployment.JSR181Deployment;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.UnifiedMetaData;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class JAXWSDeployerEJB3 extends AbstractEJBDeployer
+{
+ @Override
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
+ {
+ UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_EJB3);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
+ }
+
+ @Override
+ protected boolean isWebserviceDeployment(DeploymentUnit unit)
+ {
+ boolean isWebserviceDeployment = false;
+
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ if (container instanceof StatelessContainer && container.resolveAnnotation(WebService.class) != null)
+ {
+ isWebserviceDeployment = true;
+ break;
+ }
+ }
+ }
+
+ return isWebserviceDeployment;
+ }
+
+ protected URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit)
+ {
+ return new ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, unit);
+ }
+}
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss50;
+
+//$Id$
+
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.jws.WebService;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.deployment.JSR181Deployment;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.UnifiedMetaData;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2005
+ */
+public class JAXWSDeployerJSE extends AbstractJSEDeployer
+{
+ @Override
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
+ {
+ UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_JSE);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
+ return udi;
+ }
+
+ @Override
+ protected boolean isWebserviceDeployment(DeploymentUnit unit)
+ {
+ boolean isWebserviceDeployment = false;
+
+ Set<? extends WebMetaData> allMetaData = unit.getAllMetaData(WebMetaData.class);
+ if (allMetaData.size() > 0)
+ {
+ log.debug("unit: " + unit.getName());
+ }
+
+ return isWebserviceDeployment;
+ }
+}
Property changes on: trunk/src/main/java/org/jboss/ws/integration/jboss50/JAXWSDeployerJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -93,13 +93,13 @@
public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- URL warURL = (URL)udi.context.get(WebServiceDeployerEJB.ENDPOINT_WAR_URL);
+ URL warURL = (URL)udi.context.get(AbstractEJBDeployer.ENDPOINT_WAR_URL);
return publishServiceEndpoint(warURL);
}
public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
{
- URL warURL = (URL)udi.context.get(WebServiceDeployerEJB.ENDPOINT_WAR_URL);
+ URL warURL = (URL)udi.context.get(AbstractEJBDeployer.ENDPOINT_WAR_URL);
return destroyServiceEndpoint(warURL);
}
Deleted: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.deployment.AbstractServiceEndpointPublisher;
-import org.jboss.ws.deployment.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.UnifiedMetaData;
-import org.jboss.ws.server.KernelLocator;
-
-/**
- * A deployer service that manages web service EJB Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public abstract class WebServiceDeployerEJB extends AbstractWebServiceDeployer
-{
- public static final String ENDPOINT_WAR_URL = "EJB_ENDPOINT_WAR_URL";
-
- @Override
- protected void createServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- super.createServiceEndpoint(udi, unit);
- UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
- URL warURL = generateWebDeployment(wsMetaData, unit);
- udi.context.put(ENDPOINT_WAR_URL, warURL);
- getServiceEndpointPublisher().publishServiceEndpoint(udi);
- }
-
- @Override
- protected void destroyServiceEndpoint(UnifiedDeploymentInfo udi, DeploymentUnit unit) throws Exception
- {
- getServiceEndpointPublisher().destroyServiceEndpoint(udi);
- super.destroyServiceEndpoint(udi, unit);
- }
-
- protected ServiceEndpointPublisher getServiceEndpointPublisher()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry = registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
- return (ServiceEndpointPublisher)entry.getTarget();
- }
-
- protected abstract URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit);
-}
Deleted: trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java
===================================================================
--- trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss50;
-
-//$Id$
-
-import java.net.URL;
-import java.util.Iterator;
-
-import javax.jws.WebService;
-
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.ws.deployment.JSR181Deployment;
-import org.jboss.ws.deployment.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.UnifiedMetaData;
-
-/**
- * A deployer service that manages WS4EE compliant Web-Services for EJB3 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-May-2005
- */
-public class WebServiceDeployerEJB3 extends WebServiceDeployerEJB
-{
- @Override
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
- {
- UnifiedDeploymentInfo udi = new JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_EJB3);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
- return udi;
- }
-
- @Override
- protected boolean isWebserviceDeployment(DeploymentUnit unit)
- {
- boolean isWebserviceDeployment = false;
-
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- if (ejb3Deployment != null)
- {
- Iterator it = ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- if (container instanceof StatelessContainer && container.resolveAnnotation(WebService.class) != null)
- {
- isWebserviceDeployment = true;
- break;
- }
- }
- }
-
- return isWebserviceDeployment;
- }
-
- protected URL generateWebDeployment(UnifiedMetaData wsMetaData, DeploymentUnit unit)
- {
- return new ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, unit);
- }
-}
Modified: trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
===================================================================
--- trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml 2006-11-01 20:15:06 UTC (rev 1340)
@@ -2,7 +2,7 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="WebServiceDeployerEJB3" class="org.jboss.ws.integration.jboss50.WebServiceDeployerEJB3">
+ <bean name="JAXWSDeployerEJB3" class="org.jboss.ws.integration.jboss50.JAXWSDeployerEJB3">
<install bean="MainDeployer" method="addDeployer">
<parameter>
<this/>
@@ -17,4 +17,18 @@
<depends>WarDeployer</depends>
</bean>
+ <bean name="JAXWSDeployerJSE" class="org.jboss.ws.integration.jboss50.JAXWSDeployerJSE">
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WarDeployer</depends>
+ </bean>
+
</deployment>
\ No newline at end of file
Modified: trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxws.xml 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/test/ant/build-jars-jaxws.xml 2006-11-01 20:15:06 UTC (rev 1340)
@@ -173,7 +173,7 @@
</war>
<!-- jaxws-jsr181-webservice -->
- <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice01.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF01/web.xml">
+ <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice01-jse.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF01/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean01.class"/>
</classes>
@@ -181,7 +181,7 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
- <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice02.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF02/web.xml">
+ <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice02-jse.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF02/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean02.class"/>
</classes>
@@ -190,7 +190,7 @@
<include name="wsdl/**"/>
</webinf>
</war>
- <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice03.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF03/web.xml">
+ <war warfile="${build.test.dir}/libs/jaxws-jsr181-webservice03-jse.war" webxml="${build.test.dir}/resources/jaxws/jsr181/webservice/WEB-INF03/web.xml">
<classes dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/JSEBean03.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.class"/>
@@ -199,7 +199,7 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice01.jar">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice01-ejb21.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean01.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface.class"/>
@@ -208,7 +208,7 @@
<include name="ejb-jar.xml"/>
</metainf>
</jar>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice02.jar">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice02-ejb21.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean02.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface.class"/>
@@ -218,7 +218,7 @@
<include name="wsdl/**"/>
</metainf>
</jar>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice03.jar">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice03-ejb21.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB21Bean03.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EndpointInterface03.class"/>
@@ -227,13 +227,13 @@
<include name="ejb-jar.xml"/>
</metainf>
</jar>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice01.ejb3">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice01-ejb3.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean01.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3RemoteInterface.class"/>
</fileset>
</jar>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice02.ejb3">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice02-ejb3.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean02.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3RemoteInterface.class"/>
@@ -242,7 +242,7 @@
<include name="wsdl/**"/>
</metainf>
</jar>
- <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice03.ejb3">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jsr181-webservice03-ejb3.jar">
<fileset dir="${build.test.dir}/classes">
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3Bean03.class"/>
<include name="org/jboss/test/ws/jaxws/jsr181/webservice/EJB3RemoteInterface.class"/>
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceBase.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -66,17 +66,17 @@
assertEquals(helloWorld, retObj);
}
- public void testWebService() throws Exception
+ public void webServiceTest() throws Exception
{
sayHello();
}
- public void testWebServiceWsdlLocation() throws Exception
+ public void webServiceWsdlLocationTest() throws Exception
{
sayHello();
}
- public void testWebServiceEndpointInterface() throws Exception
+ public void webServiceEndpointInterfaceTest() throws Exception
{
sayHello();
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB21TestCase.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -21,18 +21,10 @@
*/
package org.jboss.test.ws.jaxws.jsr181.webservice;
-import java.net.MalformedURLException;
-import java.net.URL;
-
import junit.framework.Test;
-import org.jboss.test.ws.JBossWSTest;
+
import org.jboss.test.ws.JBossWSTestSetup;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory;
-import javax.naming.InitialContext;
-import javax.xml.rpc.Service;
-
/**
* Test the JSR-181 annotation: javax.jws.WebService
*
@@ -47,42 +39,42 @@
return JBossWSTestSetup.newTestSetup(JSR181WebServiceEJB21TestCase.class, "");
}
- public void testWebService() throws Exception
+ public void testWebServiceTest() throws Exception
{
- deploy("jaxws-jsr181-webservice01.jar");
+ deploy("jaxws-jsr181-webservice01-ejb21.jar");
try
{
- super.testWebService();
+ webServiceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice01.jar");
+ undeploy("jaxws-jsr181-webservice01-ejb21.jar");
}
}
- public void testWebServiceWsdlLocation() throws Exception
+ public void testWebServiceWsdlLocationTest() throws Exception
{
- deploy("jaxws-jsr181-webservice02.jar");
+ deploy("jaxws-jsr181-webservice02-ejb21.jar");
try
{
- super.testWebServiceWsdlLocation();
+ webServiceWsdlLocationTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice02.jar");
+ undeploy("jaxws-jsr181-webservice02-ejb21.jar");
}
}
- public void testWebServiceEndpointInterface() throws Exception
+ public void testWebServiceEndpointInterfaceTest() throws Exception
{
- deploy("jaxws-jsr181-webservice03.jar");
+ deploy("jaxws-jsr181-webservice03-ejb21.jar");
try
{
- super.testWebServiceEndpointInterface();
+ webServiceEndpointInterfaceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice03.jar");
+ undeploy("jaxws-jsr181-webservice03-ejb21.jar");
}
}
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceEJB3TestCase.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -43,58 +43,59 @@
public void testRemoteAccess() throws Exception
{
- deploy("jaxws-jsr181-webservice01.ejb3");
+ deploy("jaxws-jsr181-webservice01-ejb3.jar");
try
{
InitialContext iniCtx = getInitialContext();
- EJB3RemoteInterface ejb3Remote = (EJB3RemoteInterface)iniCtx.lookup("/ejb3/EJB3EndpointInterface");
-
- String helloWorld = "Hello world!";
- Object retObj = ejb3Remote.echo(helloWorld);
- assertEquals(helloWorld, retObj);
+ System.out.println("FIXME: JBAOP-300");
+// EJB3RemoteInterface ejb3Remote = (EJB3RemoteInterface)iniCtx.lookup("/ejb3/EJB3EndpointInterface");
+//
+// String helloWorld = "Hello world!";
+// Object retObj = ejb3Remote.echo(helloWorld);
+// assertEquals(helloWorld, retObj);
}
finally
{
- undeploy("jaxws-jsr181-webservice01.ejb3");
+ undeploy("jaxws-jsr181-webservice01-ejb3.jar");
}
}
- public void testWebService() throws Exception
+ public void testWebServiceTest() throws Exception
{
- deploy("jaxws-jsr181-webservice01.ejb3");
+ deploy("jaxws-jsr181-webservice01-ejb3.jar");
try
{
- super.testWebService();
+ webServiceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice01.ejb3");
+ undeploy("jaxws-jsr181-webservice01-ejb3.jar");
}
}
- public void testWebServiceWsdlLocation() throws Exception
+ public void testWebServiceWsdlLocationTest() throws Exception
{
- deploy("jaxws-jsr181-webservice02.ejb3");
+ deploy("jaxws-jsr181-webservice02-ejb3.jar");
try
{
- super.testWebServiceWsdlLocation();
+ webServiceWsdlLocationTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice02.ejb3");
+ undeploy("jaxws-jsr181-webservice02-ejb3.jar");
}
}
- public void testWebServiceEndpointInterface() throws Exception
+ public void WebServiceEndpointInterfaceTest() throws Exception
{
- deploy("jaxws-jsr181-webservice03.ejb3");
+ deploy("jaxws-jsr181-webservice03-ejb3.jar");
try
{
- super.testWebServiceEndpointInterface();
+ webServiceEndpointInterfaceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice03.ejb3");
+ undeploy("jaxws-jsr181-webservice03-ejb3.jar");
}
}
}
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java 2006-11-01 17:58:33 UTC (rev 1339)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jsr181/webservice/JSR181WebServiceJSETestCase.java 2006-11-01 20:15:06 UTC (rev 1340)
@@ -39,42 +39,42 @@
return JBossWSTestSetup.newTestSetup(JSR181WebServiceJSETestCase.class, "");
}
- public void testWebService() throws Exception
+ public void testWebServiceTest() throws Exception
{
- deploy("jaxws-jsr181-webservice01.war");
+ deploy("jaxws-jsr181-webservice01-jse.war");
try
{
- super.testWebService();
+ webServiceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice01.war");
+ undeploy("jaxws-jsr181-webservice01-jse.war");
}
}
- public void testWebServiceWsdlLocation() throws Exception
+ public void _testWebServiceWsdlLocation() throws Exception
{
- deploy("jaxws-jsr181-webservice02.war");
+ deploy("jaxws-jsr181-webservice02-jse.war");
try
{
- super.testWebServiceWsdlLocation();
+ webServiceWsdlLocationTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice02.war");
+ undeploy("jaxws-jsr181-webservice02-jse.war");
}
}
- public void testWebServiceEndpointInterface() throws Exception
+ public void _testWebServiceEndpointInterface() throws Exception
{
- deploy("jaxws-jsr181-webservice03.war");
+ deploy("jaxws-jsr181-webservice03-jse.war");
try
{
- super.testWebServiceEndpointInterface();
+ webServiceEndpointInterfaceTest();
}
finally
{
- undeploy("jaxws-jsr181-webservice03.war");
+ undeploy("jaxws-jsr181-webservice03-jse.war");
}
}
}
18 years, 2 months
JBossWS SVN: r1339 - in trunk: . src/ant src/main/etc src/main/resources src/main/resources/jbossws.deployer/META-INF
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2006-11-01 12:58:33 -0500 (Wed, 01 Nov 2006)
New Revision: 1339
Added:
trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml
Removed:
trunk/src/main/etc/jbossws14-component-info.xml
trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
trunk/src/main/resources/jbossws14.sar/
trunk/src/main/resources/org/
Modified:
trunk/build.xml
trunk/src/ant/build-thirdparty.xml
trunk/version.properties
Log:
remove retro stuff
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-11-01 10:08:06 UTC (rev 1338)
+++ trunk/build.xml 2006-11-01 17:58:33 UTC (rev 1339)
@@ -258,20 +258,6 @@
</fileset>
</jar>
- <!-- Build jbossws.beans -->
- <mkdir dir="${build.lib.dir}/jbossws.beans/META-INF"/>
- <copy todir="${build.lib.dir}/jbossws.beans/META-INF" file="${build.resources.dir}/jbossws.beans/META-INF/jboss-beans.xml"/>
-
- <!-- Build jbossws.deployer -->
- <mkdir dir="${build.lib.dir}/jbossws.deployer/META-INF"/>
- <copy todir="${build.lib.dir}/jbossws.deployer/META-INF" file="${build.resources.dir}/jbossws.deployer/META-INF/jbossws-deployer-beans.xml"/>
- <copy todir="${build.lib.dir}/jbossws.deployer">
- <fileset dir="${build.lib.dir}">
- <include name="jbossws-jboss-integration.jar"/>
- <include name="jbossws-core.jar"/>
- </fileset>
- </copy>
-
<!-- Build jbossws-client.jar -->
<jar jarfile="${build.lib.dir}/jbossws-client.jar" manifest="${build.etc.dir}/default.mf">
<fileset dir="${build.classes.dir}">
@@ -349,133 +335,14 @@
<include name="META-INF/standard-jaxws-endpoint-config.xml"/>
<include name="META-INF/jboss-service.xml"/>
</fileset>
- </jar>
-
- </target>
-
- <target name="module-jars14" depends="jbossretro">
-
- <!-- Build jboss-jaxws14.jar -->
- <mkdir dir="${build.lib.dir}"/>
- <jar jarfile="${build.lib.dir}/jboss-jaxws14.jar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.classes14.dir}">
- <include name="javax/jws/**"/>
- <include name="javax/xml/ws/**"/>
- </fileset>
- </jar>
-
- <!-- Build jbossws14-core.jar -->
- <mkdir dir="${build.lib.dir}"/>
- <jar jarfile="${build.lib.dir}/jbossws14-core.jar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.classes14.dir}">
- <include name="org/jboss/ws/**"/>
- <exclude name="org/jboss/ws/integration/**"/>
- </fileset>
<fileset dir="${build.resources.dir}">
- <include name="schema/**"/>
- <include name="dtd/**"/>
+ <include name="jbossws.beans/META-INF/jboss-beans.xml"/>
+ <include name="jbossws.deployer/META-INF/deployer-beans.xml"/>
</fileset>
</jar>
- <!-- Build jbossws14-jboss-integration.jar -->
- <jar jarfile="${build.lib.dir}/jbossws14-jboss-integration.jar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.classes14.dir}">
- <include name="org/jboss/ws/integration/*.class"/>
- <include name="org/jboss/ws/integration/jboss/**"/>
- </fileset>
- </jar>
-
- <!-- Build jbossws14-tomcat-integration.jar -->
- <jar jarfile="${build.lib.dir}/jbossws14-tomcat-integration.jar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.classes14.dir}">
- <include name="org/jboss/ws/integration/tomcat/**"/>
- </fileset>
- </jar>
-
- <!-- Build jbossws14-client.jar -->
- <jar jarfile="${build.lib.dir}/jbossws14-client.jar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.classes14.dir}">
- <include name="javax/**"/>
- <include name="org/jboss/ws/**"/>
- <exclude name="org/jboss/ws/integration/jboss/**"/>
- <exclude name="org/jboss/ws/integration/tomcat/**"/>
- </fileset>
- <fileset dir="${build.resources.dir}/jbossws.sar">
- <include name="META-INF/standard-jaxrpc-client-config.xml"/>
- </fileset>
- <fileset dir="${build.resources.dir}">
- <include name="schema/**"/>
- <include name="dtd/**"/>
- </fileset>
- <fileset dir="${build.etc.dir}">
- <include name="wstools.sh"/>
- <include name="wstools.bat"/>
- <include name="wstools-log4j.xml"/>
- </fileset>
- </jar>
-
- <!-- Build jbossws14.sar -->
- <jar jarfile="${build.lib.dir}/jbossws14.sar" manifest="${build.etc.dir}/default.mf">
- <fileset dir="${build.lib.dir}">
- <include name="jbossws14-jboss-integration.jar"/>
- <include name="jbossws14-core.jar"/>
- <include name="jbossws-context.war"/>
- <include name="jboss-jaxws14.jar"/>
- <include name="jbossws.beans/**"/>
- </fileset>
- <fileset dir="${thirdparty.dir}">
- <include name="wsdl4j.jar"/>
- <include name="xmlsec.jar"/>
- </fileset>
- <fileset dir="${build.resources.dir}/jbossws.sar">
- <include name="META-INF/standard-jaxrpc-client-config.xml"/>
- <include name="META-INF/standard-jaxrpc-endpoint-config.xml"/>
- </fileset>
- <fileset dir="${build.resources.dir}/jbossws14.sar">
- <include name="META-INF/jboss-service.xml"/>
- </fileset>
- </jar>
-
</target>
- <!--
- Retrotranslation
- -->
- <target name="jbossretro" depends="compile">
-
- <!-- Weave the build.classes to build.classes14 -->
- <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro">
- <classpath>
- <pathelement location="${thirdparty.dir}/javassist.jar"/>
- <pathelement location="${thirdparty.dir}/jbossretro.jar"/>
- </classpath>
- </taskdef>
-
- <mkdir dir="${build.classes14.dir}"/>
-
- <retro destdir="${build.classes14.dir}">
- <classpath>
- <pathelement location="${build.lib.dir}/jboss-jaxrpc.jar"/>
- <pathelement location="${build.lib.dir}/jboss-saaj.jar"/>
- <pathelement location="${thirdparty.dir}/javassist.jar"/>
- <pathelement location="${thirdparty.dir}/jbossretro.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-backport-concurrent.jar"/>
- <pathelement location="${thirdparty.dir}/ant.jar"/>
- <pathelement path="${build.classes.dir}"/>
- </classpath>
- <classpath refid="core.classpath"/>
- <classpath refid="integration.classpath"/>
- <src path="${build.classes.dir}"/>
- </retro>
-
- <copy todir="${build.classes14.dir}">
- <fileset dir="${build.resources.dir}">
- <include name="schema/**"/>
- <include name="dtd/**"/>
- </fileset>
- </copy>
- </target>
-
<!-- ================================================================== -->
<!-- Documentation -->
<!-- ================================================================== -->
@@ -508,31 +375,11 @@
</antcall>
</target>
- <!-- Deploy jbossws14 to the server -->
- <target name="module-jars14-assert" unless="jboss.jdk14.home">
- <echo>ERROR: 'jboss.jdk14.home' is not set. </echo>
- <echo>Make sure to point it to your jboss configuration thagt should run under jdk 1.4</echo>
- </target>
-
- <target name="deploy-jbossws14" depends="main,module-jars14, module-jars14-assert" description="Deploy jbossws14" if="jboss.jdk14.home">
- <antcall target="deploy-to-server">
- <param name="jboss.deploy.home" value="${jboss.jdk14.home}"/>
- <param name="jbossws" value="jbossws14"/>
- </antcall>
- <antcall target="deploy-to-thirdparty">
- <param name="jboss.deploy.home" value="${jboss.jdk14.home}"/>
- <param name="jbossws" value="jbossws14"/>
- </antcall>
- </target>
-
<!-- Deploy to jboss -->
<target name="deploy-to-server">
<copy todir="${jboss.deploy.home}/client" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss.deploy.home}/lib" file="${thirdparty.dir}/jboss-xml-binding.jar" overwrite="true"/>
<copy todir="${jboss.deploy.home}/client" file="${build.lib.dir}/${jbossws}-client.jar" overwrite="true"/>
- <copy todir="${jboss.deploy.home}/server/${jboss.server.instance}/deployers" overwrite="true">
- <fileset dir="${build.lib.dir}" includes="jbossws.deployer/**"/>
- </copy>
<delete dir="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar"/>
<mkdir dir="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar"/>
<unjar dest="${jboss.deploy.home}/server/${jboss.server.instance}/deploy/${jbossws}.sar" src="${build.lib.dir}/${jbossws}.sar"/>
@@ -588,8 +435,7 @@
<!-- Deploy jbossws to the server specified like this: -Dserver=default -->
<target name="release" depends="all" description="Release to jboss.local.repository">
-
- <!-- jbossws -->
+
<property name="jbossws.dir" value="${jboss.local.repository}/jboss/jbossws/${repository.id}"/>
<mkdir dir="${jbossws.dir}/lib"/>
<copy todir="${jbossws.dir}/lib" overwrite="true">
@@ -606,24 +452,6 @@
<filtersfile file="version.properties"/>
</filterset>
</copy>
-
- <!-- jbossws14 -->
- <property name="jbossws14.dir" value="${jboss.local.repository}/jboss/jbossws14/${repository.id}"/>
- <mkdir dir="${jbossws14.dir}/lib"/>
- <copy todir="${jbossws14.dir}/lib" overwrite="true">
- <fileset dir="${build.lib.dir}">
- <include name="jbossws14.sar"/>
- <include name="jbossws14-client.jar"/>
- <include name="jboss-jaxws14.jar"/>
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-saaj.jar"/>
- </fileset>
- </copy>
- <copy tofile="${jbossws14.dir}/component-info.xml" file="${src.etc.dir}/jbossws14-component-info.xml" filtering="true" overwrite="true">
- <filterset>
- <filtersfile file="version.properties"/>
- </filterset>
- </copy>
</target>
<!-- ================================================================== -->
@@ -640,7 +468,7 @@
<target name="most" description="Builds almost everything." depends="jars"/>
<target name="all" description="Create a distribution zip file"
- depends="main,module-jars14,jbossws-thirdparty-jar,build-samples,build-docs,build-bin-dist,build-src-dist">
+ depends="main,jbossws-thirdparty-jar,build-samples,build-docs,build-bin-dist,build-src-dist">
</target>
<!-- Build the documentation -->
@@ -690,11 +518,6 @@
<fileset dir="${build.lib.dir}" includes="jbossws-client.jar,jbossws.sar"/>
</copy>
- <!-- lib/jdk1.4 -->
- <copy todir="${build.bin.dist}/lib/jboss-jdk1.4" overwrite="true">
- <fileset dir="${build.lib.dir}" includes="jbossws14-client.jar,jbossws14.sar"/>
- </copy>
-
<!-- lib/tomcat -->
<copy todir="${build.bin.dist}/lib/tomcat/common/endorsed" overwrite="true">
<fileset dir="${thirdparty.dir}">
Modified: trunk/src/ant/build-thirdparty.xml
===================================================================
--- trunk/src/ant/build-thirdparty.xml 2006-11-01 10:08:06 UTC (rev 1338)
+++ trunk/src/ant/build-thirdparty.xml 2006-11-01 17:58:33 UTC (rev 1339)
@@ -34,14 +34,12 @@
<get src="${jboss.repository}/hibernate/${hibernate}/lib/hibernate3.jar" dest="${thirdparty.dir}/hibernate3.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/javassist/${javassist}/lib/javassist.jar" dest="${thirdparty.dir}/javassist.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/backport-concurrent/${jboss-backport-concurrent}/lib/jboss-backport-concurrent.jar" dest="${thirdparty.dir}/jboss-backport-concurrent.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common/${jboss-common}/lib/jboss-common.jar" dest="${thirdparty.dir}/jboss-common.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossretro/${jboss-jbossretro}/lib/jbossretro.jar" dest="${thirdparty.dir}/jbossretro.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jbpm/bpel/${jbpm-bpel}/lib/jbpm-bpel.sar" dest="${thirdparty.dir}/jbpm-bpel.sar" usetimestamp="true" verbose="true" />
<get src="${jboss.repository}/junit/${junit}/lib/junit.jar" dest="${thirdparty.dir}/junit.jar" usetimestamp="true" verbose="true"/>
Deleted: trunk/src/main/etc/jbossws14-component-info.xml
===================================================================
--- trunk/src/main/etc/jbossws14-component-info.xml 2006-11-01 10:08:06 UTC (rev 1338)
+++ trunk/src/main/etc/jbossws14-component-info.xml 2006-11-01 17:58:33 UTC (rev 1339)
@@ -1,43 +0,0 @@
-<project name="jboss/jbossws-component-info">
-
- <component id="jboss/jbossws14"
- licenseType="lgpl"
- version="@repository.id@"
- description="JBossWS an implementation of J2EE Web Services">
-
- <artifact id="jboss-jaxrpc.jar"/>
- <artifact id="jboss-jaxws.jar"/>
- <artifact id="jboss-saaj.jar"/>
- <artifact id="jbossws14-client.jar"/>
- <artifact id="jbossws14.sar"/>
-
- <import componentref="apache-xmlsec">
- <compatible version="@apache-xmlsec@"/>
- </import>
- <import componentref="javassist">
- <compatible version="@javassist@"/>
- </import>
- <import componentref="ibm-wsdl4j">
- <compatible version="@ibm-wsdl4j@"/>
- </import>
- <import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
- </import>
- <import componentref="jboss/remoting">
- <compatible version="@jboss-remoting@"/>
- </import>
- <import componentref="jboss/jbossretro">
- <compatible version="@jboss-jbossretro@"/>
- </import>
-
- <export>
- <include input="jboss-jaxrpc.jar"/>
- <include input="jboss-jaxws.jar"/>
- <include input="jboss-saaj.jar"/>
- <include input="jbossws14-client.jar"/>
- <include input="jbossws14.sar"/>
- </export>
-
- </component>
-
-</project>
Copied: trunk/src/main/resources/jbossws.deployer/META-INF/deployer-beans.xml (from rev 1335, trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml)
Deleted: trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2006-11-01 10:08:06 UTC (rev 1338)
+++ trunk/src/main/resources/jbossws.deployer/META-INF/jbossws-deployer-beans.xml 2006-11-01 17:58:33 UTC (rev 1339)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="WebServiceDeployerEJB3" class="org.jboss.ws.integration.jboss50.WebServiceDeployerEJB3">
- <install bean="MainDeployer" method="addDeployer">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="MainDeployer" method="removeDeployer">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>EJBRegistrationDeployer</depends>
- <depends>WarDeployer</depends>
- </bean>
-
-</deployment>
\ No newline at end of file
Modified: trunk/version.properties
===================================================================
--- trunk/version.properties 2006-11-01 10:08:06 UTC (rev 1338)
+++ trunk/version.properties 2006-11-01 17:58:33 UTC (rev 1339)
@@ -29,7 +29,6 @@
apache-xerces=2.7.1
hibernate=3.2.0.CR2
jboss-backport-concurrent=2.1.0.GA
-jboss-jbossretro=1.0.2.GA
jbpm-bpel=1.1.Beta2
junit=3.8.1
oswego-concurrent=1.3.4
18 years, 2 months
JBossWS SVN: r1338 - branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2006-11-01 05:08:06 -0500 (Wed, 01 Nov 2006)
New Revision: 1338
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
Log:
fixed missing resources
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-11-01 10:07:53 UTC (rev 1337)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/doclit/XOPBase.java 2006-11-01 10:08:06 UTC (rev 1338)
@@ -58,7 +58,7 @@
public void testResponseOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/xop/shared/attach.jpeg"));
// disable MTOM
((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.FALSE);
@@ -72,7 +72,7 @@
public void testRequestOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/xop/shared/attach.jpeg"));
// reusing the stub means cleaning the previous state
((Stub)getPort())._setProperty(StubExt.PROPERTY_MTOM_ENABLED, Boolean.TRUE);
18 years, 2 months
JBossWS SVN: r1337 - branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2006-11-01 05:07:53 -0500 (Wed, 01 Nov 2006)
New Revision: 1337
Modified:
branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
Log:
fixed missing resources
Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-10-31 21:54:37 UTC (rev 1336)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/jaxrpc/xop/rpclit/XOPBase.java 2006-11-01 10:07:53 UTC (rev 1337)
@@ -53,14 +53,14 @@
public void testResponseOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/xop/shared/attach.jpeg"));
requestComplex(new PingMsg("0|1", bytesIn));
}
public void testRequestOptimized() throws Exception {
- byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/samples/mtom/attach.jpeg"));
+ byte[] bytesIn = XOPTestSupport.getBytesFromFile(new File("resources/jaxrpc/xop/shared/attach.jpeg"));
requestComplex(new PingMsg("1|0", bytesIn));
}
18 years, 2 months