JBossWS SVN: r10749 - in stack/native/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-23 06:43:38 -0400 (Wed, 23 Sep 2009)
New Revision: 10749
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/pom.xml
Log:
[JBWS-2674][JBWS-2754] enabling endpoint API tests
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-09-23 10:42:05 UTC (rev 10748)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-09-23 10:43:38 UTC (rev 10749)
@@ -12,6 +12,3 @@
# [JBWS-2634] Implement support for @EJB annotations in WS components (fixed in AS 501 and above)
org/jboss/test/ws/jaxws/jbws2634/**
-
-# [JBWS-2674] Implement javax.xml.ws.Endpoint
-org/jboss/test/ws/jaxws/endpoint/*TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-09-23 10:42:05 UTC (rev 10748)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-09-23 10:43:38 UTC (rev 10749)
@@ -7,6 +7,3 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
-# [JBWS-2674] Implement javax.xml.ws.Endpoint
-org/jboss/test/ws/jaxws/endpoint/*TestCase.*
-
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-09-23 10:42:05 UTC (rev 10748)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-09-23 10:43:38 UTC (rev 10749)
@@ -7,6 +7,3 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
-# [JBWS-2674] Implement javax.xml.ws.Endpoint
-org/jboss/test/ws/jaxws/endpoint/*TestCase.*
-
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2009-09-23 10:42:05 UTC (rev 10748)
+++ stack/native/trunk/pom.xml 2009-09-23 10:43:38 UTC (rev 10749)
@@ -50,9 +50,9 @@
<jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.2.1-SNAPSHOT</jbossws.framework.version>
<jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.jboss500.version>3.2.0.GA</jbossws.jboss500.version>
- <jbossws.jboss501.version>3.2.0.GA</jbossws.jboss501.version>
- <jbossws.jboss510.version>3.2.0.GA</jbossws.jboss510.version>
+ <jbossws.jboss500.version>3.2.1-SNAPSHOT</jbossws.jboss500.version>
+ <jbossws.jboss501.version>3.2.1-SNAPSHOT</jbossws.jboss501.version>
+ <jbossws.jboss510.version>3.2.1-SNAPSHOT</jbossws.jboss510.version>
<!-- [JBWS-2505] -->
<!-- START -->
<!--
15 years, 5 months
JBossWS SVN: r10748 - in container/jboss50/branches: jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment and 19 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-23 06:42:05 -0400 (Wed, 23 Sep 2009)
New Revision: 10748
Added:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/endpoint/
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/endpoint/
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/endpoint/
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
Removed:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/jbossws-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-2674][JBWS-2754] resuscitating server side JAX-WS endpoint API
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -5,6 +5,7 @@
import org.jboss.logging.Logger;
import org.jboss.metadata.serviceref.VirtualFileAdaptor;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
@@ -17,7 +18,7 @@
/**
* Base class for all deployment model builders.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
@@ -43,7 +44,7 @@
/**
* @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
- *
+ *
* @param unit deployment unit
*/
public final void newDeploymentModel(final DeploymentUnit unit)
@@ -58,7 +59,7 @@
/**
* Template method for subclasses to implement.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -66,7 +67,7 @@
/**
* Creates new Web Service endpoint.
- *
+ *
* @param endpointClass endpoint class name
* @param endpointName endpoint name
* @param dep deployment
@@ -93,7 +94,7 @@
/**
* Creates new Web Service deployment.
- *
+ *
* @param unit deployment unit
* @return archive deployment
*/
@@ -112,7 +113,14 @@
dep.setParent(parentDep);
}
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ if (unit instanceof VFSDeploymentUnit)
+ {
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ }
+ else
+ {
+ dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
+ }
dep.setRuntimeClassLoader(unit.getClassLoader());
final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
dep.setType(deploymentType);
@@ -122,7 +130,7 @@
/**
* Creates new archive deployment.
- *
+ *
* @param name deployment name
* @param loader deployment loader
* @return new archive deployment
@@ -136,7 +144,7 @@
* Gets specified attachment from deployment unit.
* Checks it's not null and then propagates it to <b>dep</b>
* attachments. Finally it returns attachment value.
- *
+ *
* @param <A> class type
* @param attachment attachment
* @param unit deployment unit
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -4,7 +4,7 @@
/**
* Deployment builder interface.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
interface DeploymentModelBuilder
@@ -12,7 +12,7 @@
/**
* Creates Web Service deployment model and associates it with deployment.
- *
+ *
* @param unit deployment unit
*/
void newDeploymentModel(DeploymentUnit unit);
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,249 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.endpoint;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * JAXWS HTTP server implementation that nestles inside JBoss AS.
+ * This implementation simply delegates deployment of dynamically created
+ * JBoss web deployment to JBoss main deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class EndpointAPIHttpServer extends AbstractExtensible implements HttpServer
+{
+
+ /** JBoss deployment factory. */
+ private final DeploymentFactory factory = new DeploymentFactory();
+ /** JBoss Main deployer. */
+ private final DeployerClient mainDeployer;
+ /** JBossWS SPI provider. */
+ private final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ /** Registered deployments. */
+ private final Map<String, Deployment> deployments = new HashMap<String, Deployment>();
+
+ /**
+ * Constructor - invoked by MC.
+ *
+ * @param mainDeployer JBoss main deployer
+ */
+ public EndpointAPIHttpServer(final DeployerClient mainDeployer)
+ {
+ super();
+ this.mainDeployer = mainDeployer;
+ }
+
+ /**
+ * Starts an instance of this HTTP server.
+ */
+ public void start()
+ {
+ // Nothing to start, we're running inside JBoss AS
+ }
+
+ /**
+ * Creates an requested HTTP context.
+ *
+ * @param contextRoot context root name
+ * @return context instance
+ */
+ public synchronized HttpContext createContext(final String contextRoot)
+ {
+ return this.spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ }
+
+ /**
+ * Publishes a JAXWS endpoint to the JBoss server.
+ *
+ * @param context web context
+ * @param endpoint to publish
+ */
+ public synchronized void publish(final HttpContext context, final Endpoint endpoint)
+ {
+ final String contextRoot = context.getContextRoot();
+ if (this.deployments.keySet().contains(contextRoot))
+ {
+ throw new WSFDeploymentException("Context root '" + contextRoot + "' already exists");
+ }
+
+ final Class<?> endpointClass = this.getEndpointClass(endpoint);
+ final ClassLoader endpointClassLoader = endpointClass.getClassLoader();
+ final Deployment deployment = this.createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
+ final MutableAttachments mutableAttachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
+ final JBossWebMetaData jbossWebMD = this.newJBossWebMetaData(contextRoot, endpointClass);
+
+ mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbossWebMD);
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(endpointClassLoader));
+
+ try
+ {
+ this.mainDeployer.deploy(deployment);
+ this.deployments.put(contextRoot, deployment);
+ }
+ catch (DeploymentException de)
+ {
+ WSFDeploymentException.rethrow(de);
+ }
+ }
+
+ /**
+ * Destroys dynamically published JAXWS endpoint on the JBoss server.
+ *
+ * @param context to be destroyed
+ * @param endpoint to be unpublished
+ */
+ public synchronized void destroy(final HttpContext context, final Endpoint endpoint)
+ {
+ try
+ {
+ final String contextRoot = context.getContextRoot();
+ final Deployment deployment = this.deployments.remove(contextRoot);
+ if (deployment != null)
+ {
+ this.mainDeployer.undeploy(deployment);
+ }
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ /**
+ * Returns implementor class associated with endpoint.
+ *
+ * @param endpoint to get implementor class from
+ * @return implementor class
+ */
+ private Class<?> getEndpointClass(final Endpoint endpoint)
+ {
+ final Object implementor = endpoint.getImplementor();
+ return implementor instanceof Class<?> ? (Class<?>) implementor : implementor.getClass();
+ }
+
+ /**
+ * Creates new JBoss web meta data.
+ *
+ * @param contextRoot context root
+ * @param endpointClass endpoint class
+ * @return new JBoss web meta data
+ */
+ private JBossWebMetaData newJBossWebMetaData(final String contextRoot, final Class<?> endpointClass)
+ {
+ final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+ final JBossServletsMetaData servletsMD = WebMetaDataHelper.getServlets(jbossWebMD);
+ final List<ServletMappingMetaData> servletMappingMD = WebMetaDataHelper.getServletMappings(jbossWebMD);
+ final String servletName = "jaxws-dynamic-endpoint";
+
+ WebMetaDataHelper.newServlet(servletName, endpointClass.getName(), servletsMD);
+ WebMetaDataHelper.newServletMapping(servletName, WebMetaDataHelper.getUrlPatterns("/*"), servletMappingMD);
+ jbossWebMD.setContextRoot(contextRoot);
+
+ return jbossWebMD;
+ }
+
+ /**
+ * Creates simple web deployment using deployers client api.
+ *
+ * @param name deployment name
+ * @return new deployment
+ */
+ private Deployment createSimpleDeployment(final String name)
+ {
+ final Deployment unit = new AbstractDeployment(name);
+ this.factory.addContext(unit, "");
+
+ return unit;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory
+ */
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ /** Delegee. */
+ private ClassLoader classLoader;
+
+ /**
+ * Constructor.
+ *
+ * @param classLoader class loader
+ */
+ public ContextClassLoaderFactory(final ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#createClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @return class loader
+ * @throws Exception never thrown in our case
+ */
+ public ClassLoader createClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ return this.classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#removeClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @throws Exception never thrown in our case
+ */
+ public void removeClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ this.classLoader = null;
+ }
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -41,6 +41,7 @@
abstract class AbstractMetaDataBuilderEJB
{
+ /** Logger. */
protected final Logger log = Logger.getLogger(this.getClass());
/**
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -32,6 +32,7 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -266,7 +267,7 @@
/**
* Creates login-config part of web.xml descriptor.
- *
+ *
* <pre>
* <login-config>
* <auth-method>EjbDeploymentAuthMethod</auth-method>
Deleted: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -1,424 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.AuthConstraintMetaData;
-import org.jboss.metadata.web.spec.LoginConfigMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.metadata.web.spec.TransportGuaranteeType;
-import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-
-/**
- * Utility class that simplifies work with JBossWebMetaData object structure.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-final class WebMetaDataHelper
-{
-
- /** Star utility string. */
- private static final String STAR_STRING = "*";
-
- /** GET http method utility string. */
- private static final String GET_STRING = "GET";
-
- /** POST http method utility string. */
- private static final String POST_STRING = "POST";
-
- /** GET and POST methods utility list. */
- private static List<String> getAndPostMethods;
-
- /** POST method utility list. */
- private static List<String> onlyPostMethod;
-
- /** All roles utility list. */
- private static List<String> allRoles;
-
- static
- {
- final List<String> getAndPostList = new LinkedList<String>();
- getAndPostList.add(WebMetaDataHelper.GET_STRING);
- getAndPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
-
- final List<String> onlyPostList = new LinkedList<String>();
- onlyPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
-
- final List<String> roleNamesList = new LinkedList<String>();
- roleNamesList.add(WebMetaDataHelper.STAR_STRING);
- WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
- }
-
- /**
- * Constructor.
- */
- private WebMetaDataHelper()
- {
- super();
- }
-
- /**
- * Creates URL pattern list from passed string.
- *
- * @param urlPattern URL pattern
- * @return list wrapping passed parameter
- */
- static List<String> getUrlPatterns(final String urlPattern)
- {
- final List<String> linkedList = new LinkedList<String>();
-
- linkedList.add(urlPattern);
-
- return linkedList;
- }
-
- /**
- * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
- *
- * @param secureWsdlAccess whether WSDL is secured
- * @return web access methods
- */
- static List<String> getHttpMethods(final boolean secureWsdlAccess)
- {
- return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
- }
-
- /**
- * Returns all role list.
- *
- * @return all role list
- */
- static List<String> getAllRoles()
- {
- return WebMetaDataHelper.allRoles;
- }
-
- /**
- * Gests servlets meta data from jboss web meta data.
- * If not found it creates new servlets meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlets meta data
- */
- static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
- {
- JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
-
- if (servletsMD == null)
- {
- servletsMD = new JBossServletsMetaData();
- jbossWebMD.setServlets(servletsMD);
- }
-
- return servletsMD;
- }
-
- /**
- * Gests servlet mappings meta data from jboss web meta data.
- * If not found it creates new servlet mappings meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlet mappings meta data
- */
- static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
- {
- List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
-
- if (servletMappingsMD == null)
- {
- servletMappingsMD = new LinkedList<ServletMappingMetaData>();
- jbossWebMD.setServletMappings(servletMappingsMD);
- }
-
- return servletMappingsMD;
- }
-
- /**
- * Gests security constraints meta data from jboss web meta data.
- * If not found it creates new security constraints meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return security constraints meta data
- */
- static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
- {
- List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
-
- if (securityConstraintsMD == null)
- {
- securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
- jbossWebMD.setSecurityContraints(securityConstraintsMD);
- }
-
- return securityConstraintsMD;
- }
-
- /**
- * Gests login config meta data from jboss web meta data.
- * If not found it creates new login config meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return login config meta data
- */
- static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
- {
- LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
-
- if (loginConfigMD == null)
- {
- loginConfigMD = new LoginConfigMetaData();
- jbossWebMD.setLoginConfig(loginConfigMD);
- }
-
- return loginConfigMD;
- }
-
- /**
- * Gests context parameters meta data from jboss web meta data.
- * If not found it creates new context parameters meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return context parameters meta data
- */
- static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
- {
- List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
-
- if (contextParamsMD == null)
- {
- contextParamsMD = new LinkedList<ParamValueMetaData>();
- jbossWebMD.setContextParams(contextParamsMD);
- }
-
- return contextParamsMD;
- }
-
- /**
- * Gests web resource collections meta data from security constraint meta data.
- * If not found it creates new web resource collections meta data
- * and associates them with security constraint meta data.
- *
- * @param securityConstraintMD security constraint meta data
- * @return web resource collections meta data
- */
- static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
- {
- WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
-
- if (webResourceCollectionsMD == null)
- {
- webResourceCollectionsMD = new WebResourceCollectionsMetaData();
- securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
- }
-
- return webResourceCollectionsMD;
- }
-
- /**
- * Gests init parameters meta data from servlet meta data.
- * If not found it creates new init parameters meta data
- * and associates them with servlet meta data.
- *
- * @param servletMD servlet meta data
- * @return init parameters meta data
- */
- static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
- {
- List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
-
- if (initParamsMD == null)
- {
- initParamsMD = new LinkedList<ParamValueMetaData>();
- servletMD.setInitParam(initParamsMD);
- }
-
- return initParamsMD;
- }
-
- /**
- * Creates new security constraint meta data and associates them with security constraints meta data.
- *
- * @param securityConstraintsMD security constraints meta data
- * @return new security constraing meta data
- */
- static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
- {
- final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
-
- securityConstraintsMD.add(securityConstraintMD);
-
- return securityConstraintMD;
- }
-
- /**
- * Creates new web resource collection meta data and associates them with web resource collections meta data.
- *
- * @param servletName servlet name
- * @param urlPattern URL pattern
- * @param securedWsdl whether WSDL access is secured
- * @param webResourceCollectionsMD web resource collections meta data
- * @return new web resource collection meta data
- */
- static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
- final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
- {
- final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
-
- webResourceCollectionMD.setWebResourceName(servletName);
- webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
- webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
- webResourceCollectionsMD.add(webResourceCollectionMD);
-
- return webResourceCollectionMD;
- }
-
- /**
- * Creates new servlet meta data and associates them with servlets meta data.
- *
- * @param servletName servlet name
- * @param servletClass servlet class name
- * @param servletsMD servlets meta data
- * @return new servlet meta data
- */
- static JBossServletMetaData newServlet(final String servletName, final String servletClass,
- final JBossServletsMetaData servletsMD)
- {
- final JBossServletMetaData servletMD = new JBossServletMetaData();
-
- servletMD.setServletName(servletName);
- servletMD.setServletClass(servletClass);
- servletsMD.add(servletMD);
-
- return servletMD;
- }
-
- /**
- * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
- *
- * @param servletName servlet name
- * @param urlPatterns URL patterns
- * @param servletMappingsMD servlet mapping meta data
- * @return new servlet mapping meta data
- */
- static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
- final List<ServletMappingMetaData> servletMappingsMD)
- {
- final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
-
- servletMappingMD.setServletName(servletName);
- servletMappingMD.setUrlPatterns(urlPatterns);
- servletMappingsMD.add(servletMappingMD);
-
- return servletMappingMD;
- }
-
- /**
- * Creates new authentication constraint and associates it with security constraint meta data.
- *
- * @param roleNames roles
- * @param securityConstraintMD security constraint meta data
- * @return new authentication constraint meta data
- */
- static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
-
- authConstraintMD.setRoleNames(roleNames);
- securityConstraintMD.setAuthConstraint(authConstraintMD);
-
- return authConstraintMD;
- }
-
- /**
- * Creates new user constraint meta data and associates it with security constraint meta data.
- *
- * @param transportGuarantee transport guarantee value
- * @param securityConstraintMD security constraint meta data
- * @return new user data constraint meta data
- */
- static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
- final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
-
- userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
- securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
-
- return userDataConstraintMD;
- }
-
- /**
- * Creates new parameter meta data and associates it with parameters meta data.
- *
- * @param key parameter key
- * @param value parameter value
- * @param paramsMD parameters meta data
- * @return new parameter meta data
- */
- static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
- {
- final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
-
- paramsMD.add(paramValueMD);
-
- return paramValueMD;
- }
-
- /**
- * Creates new parameter with specified key and value.
- *
- * @param key the key
- * @param value the value
- * @return new parameter
- */
- private static ParamValueMetaData newParamValue(final String key, final String value)
- {
- final ParamValueMetaData paramMD = new ParamValueMetaData();
-
- paramMD.setParamName(key);
- paramMD.setParamValue(value);
-
- return paramMD;
- }
-
-}
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -29,6 +29,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSConstants;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
Added: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,424 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.util;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+
+/**
+ * Utility class that simplifies work with JBossWebMetaData object structure.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataHelper
+{
+
+ /** Star utility string. */
+ private static final String STAR_STRING = "*";
+
+ /** GET http method utility string. */
+ private static final String GET_STRING = "GET";
+
+ /** POST http method utility string. */
+ private static final String POST_STRING = "POST";
+
+ /** GET and POST methods utility list. */
+ private static List<String> getAndPostMethods;
+
+ /** POST method utility list. */
+ private static List<String> onlyPostMethod;
+
+ /** All roles utility list. */
+ private static List<String> allRoles;
+
+ static
+ {
+ final List<String> getAndPostList = new LinkedList<String>();
+ getAndPostList.add(WebMetaDataHelper.GET_STRING);
+ getAndPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
+
+ final List<String> onlyPostList = new LinkedList<String>();
+ onlyPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
+
+ final List<String> roleNamesList = new LinkedList<String>();
+ roleNamesList.add(WebMetaDataHelper.STAR_STRING);
+ WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
+ }
+
+ /**
+ * Constructor.
+ */
+ private WebMetaDataHelper()
+ {
+ super();
+ }
+
+ /**
+ * Creates URL pattern list from passed string.
+ *
+ * @param urlPattern URL pattern
+ * @return list wrapping passed parameter
+ */
+ public static List<String> getUrlPatterns(final String urlPattern)
+ {
+ final List<String> linkedList = new LinkedList<String>();
+
+ linkedList.add(urlPattern);
+
+ return linkedList;
+ }
+
+ /**
+ * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
+ *
+ * @param secureWsdlAccess whether WSDL is secured
+ * @return web access methods
+ */
+ public static List<String> getHttpMethods(final boolean secureWsdlAccess)
+ {
+ return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
+ }
+
+ /**
+ * Returns all role list.
+ *
+ * @return all role list
+ */
+ public static List<String> getAllRoles()
+ {
+ return WebMetaDataHelper.allRoles;
+ }
+
+ /**
+ * Gests servlets meta data from jboss web meta data.
+ * If not found it creates new servlets meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlets meta data
+ */
+ public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
+ {
+ JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
+
+ if (servletsMD == null)
+ {
+ servletsMD = new JBossServletsMetaData();
+ jbossWebMD.setServlets(servletsMD);
+ }
+
+ return servletsMD;
+ }
+
+ /**
+ * Gests servlet mappings meta data from jboss web meta data.
+ * If not found it creates new servlet mappings meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet mappings meta data
+ */
+ public static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
+ {
+ List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
+
+ if (servletMappingsMD == null)
+ {
+ servletMappingsMD = new LinkedList<ServletMappingMetaData>();
+ jbossWebMD.setServletMappings(servletMappingsMD);
+ }
+
+ return servletMappingsMD;
+ }
+
+ /**
+ * Gests security constraints meta data from jboss web meta data.
+ * If not found it creates new security constraints meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return security constraints meta data
+ */
+ public static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
+ {
+ List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
+
+ if (securityConstraintsMD == null)
+ {
+ securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
+ jbossWebMD.setSecurityContraints(securityConstraintsMD);
+ }
+
+ return securityConstraintsMD;
+ }
+
+ /**
+ * Gests login config meta data from jboss web meta data.
+ * If not found it creates new login config meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return login config meta data
+ */
+ public static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
+ {
+ LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
+
+ if (loginConfigMD == null)
+ {
+ loginConfigMD = new LoginConfigMetaData();
+ jbossWebMD.setLoginConfig(loginConfigMD);
+ }
+
+ return loginConfigMD;
+ }
+
+ /**
+ * Gests context parameters meta data from jboss web meta data.
+ * If not found it creates new context parameters meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return context parameters meta data
+ */
+ public static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
+ {
+ List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
+
+ if (contextParamsMD == null)
+ {
+ contextParamsMD = new LinkedList<ParamValueMetaData>();
+ jbossWebMD.setContextParams(contextParamsMD);
+ }
+
+ return contextParamsMD;
+ }
+
+ /**
+ * Gests web resource collections meta data from security constraint meta data.
+ * If not found it creates new web resource collections meta data
+ * and associates them with security constraint meta data.
+ *
+ * @param securityConstraintMD security constraint meta data
+ * @return web resource collections meta data
+ */
+ public static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
+ {
+ WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
+
+ if (webResourceCollectionsMD == null)
+ {
+ webResourceCollectionsMD = new WebResourceCollectionsMetaData();
+ securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
+ }
+
+ return webResourceCollectionsMD;
+ }
+
+ /**
+ * Gests init parameters meta data from servlet meta data.
+ * If not found it creates new init parameters meta data
+ * and associates them with servlet meta data.
+ *
+ * @param servletMD servlet meta data
+ * @return init parameters meta data
+ */
+ public static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
+ {
+ List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
+
+ if (initParamsMD == null)
+ {
+ initParamsMD = new LinkedList<ParamValueMetaData>();
+ servletMD.setInitParam(initParamsMD);
+ }
+
+ return initParamsMD;
+ }
+
+ /**
+ * Creates new security constraint meta data and associates them with security constraints meta data.
+ *
+ * @param securityConstraintsMD security constraints meta data
+ * @return new security constraing meta data
+ */
+ public static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
+ {
+ final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
+
+ securityConstraintsMD.add(securityConstraintMD);
+
+ return securityConstraintMD;
+ }
+
+ /**
+ * Creates new web resource collection meta data and associates them with web resource collections meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPattern URL pattern
+ * @param securedWsdl whether WSDL access is secured
+ * @param webResourceCollectionsMD web resource collections meta data
+ * @return new web resource collection meta data
+ */
+ public static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
+ final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
+ {
+ final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
+
+ webResourceCollectionMD.setWebResourceName(servletName);
+ webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
+ webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
+ webResourceCollectionsMD.add(webResourceCollectionMD);
+
+ return webResourceCollectionMD;
+ }
+
+ /**
+ * Creates new servlet meta data and associates them with servlets meta data.
+ *
+ * @param servletName servlet name
+ * @param servletClass servlet class name
+ * @param servletsMD servlets meta data
+ * @return new servlet meta data
+ */
+ public static JBossServletMetaData newServlet(final String servletName, final String servletClass,
+ final JBossServletsMetaData servletsMD)
+ {
+ final JBossServletMetaData servletMD = new JBossServletMetaData();
+
+ servletMD.setServletName(servletName);
+ servletMD.setServletClass(servletClass);
+ servletsMD.add(servletMD);
+
+ return servletMD;
+ }
+
+ /**
+ * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPatterns URL patterns
+ * @param servletMappingsMD servlet mapping meta data
+ * @return new servlet mapping meta data
+ */
+ public static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
+ final List<ServletMappingMetaData> servletMappingsMD)
+ {
+ final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
+
+ servletMappingMD.setServletName(servletName);
+ servletMappingMD.setUrlPatterns(urlPatterns);
+ servletMappingsMD.add(servletMappingMD);
+
+ return servletMappingMD;
+ }
+
+ /**
+ * Creates new authentication constraint and associates it with security constraint meta data.
+ *
+ * @param roleNames roles
+ * @param securityConstraintMD security constraint meta data
+ * @return new authentication constraint meta data
+ */
+ public static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
+
+ authConstraintMD.setRoleNames(roleNames);
+ securityConstraintMD.setAuthConstraint(authConstraintMD);
+
+ return authConstraintMD;
+ }
+
+ /**
+ * Creates new user constraint meta data and associates it with security constraint meta data.
+ *
+ * @param transportGuarantee transport guarantee value
+ * @param securityConstraintMD security constraint meta data
+ * @return new user data constraint meta data
+ */
+ public static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
+ final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
+
+ userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
+ securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
+
+ return userDataConstraintMD;
+ }
+
+ /**
+ * Creates new parameter meta data and associates it with parameters meta data.
+ *
+ * @param key parameter key
+ * @param value parameter value
+ * @param paramsMD parameters meta data
+ * @return new parameter meta data
+ */
+ public static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
+ {
+ final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
+
+ paramsMD.add(paramValueMD);
+
+ return paramValueMD;
+ }
+
+ /**
+ * Creates new parameter with specified key and value.
+ *
+ * @param key the key
+ * @param value the value
+ * @return new parameter
+ */
+ private static ParamValueMetaData newParamValue(final String key, final String value)
+ {
+ final ParamValueMetaData paramMD = new ParamValueMetaData();
+
+ paramMD.setParamName(key);
+ paramMD.setParamValue(value);
+
+ return paramMD;
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 10:42:05 UTC (rev 10748)
@@ -12,6 +12,15 @@
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
+ <!-- Endpoint API http server -->
+ <bean name="WSHTTPServer" class="org.jboss.webservices.integration.endpoint.EndpointAPIHttpServer">
+ <constructor>
+ <parameter>
+ <inject bean="MainDeployer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig" class="org.jboss.webservices.integration.config.ServerConfigImpl">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -5,6 +5,7 @@
import org.jboss.logging.Logger;
import org.jboss.metadata.serviceref.VirtualFileAdaptor;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
@@ -17,7 +18,7 @@
/**
* Base class for all deployment model builders.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
@@ -43,7 +44,7 @@
/**
* @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
- *
+ *
* @param unit deployment unit
*/
public final void newDeploymentModel(final DeploymentUnit unit)
@@ -58,7 +59,7 @@
/**
* Template method for subclasses to implement.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -66,7 +67,7 @@
/**
* Creates new Web Service endpoint.
- *
+ *
* @param endpointClass endpoint class name
* @param endpointName endpoint name
* @param dep deployment
@@ -93,7 +94,7 @@
/**
* Creates new Web Service deployment.
- *
+ *
* @param unit deployment unit
* @return archive deployment
*/
@@ -112,7 +113,14 @@
dep.setParent(parentDep);
}
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ if (unit instanceof VFSDeploymentUnit)
+ {
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ }
+ else
+ {
+ dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
+ }
dep.setRuntimeClassLoader(unit.getClassLoader());
final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
dep.setType(deploymentType);
@@ -122,7 +130,7 @@
/**
* Creates new archive deployment.
- *
+ *
* @param name deployment name
* @param loader deployment loader
* @return new archive deployment
@@ -136,7 +144,7 @@
* Gets specified attachment from deployment unit.
* Checks it's not null and then propagates it to <b>dep</b>
* attachments. Finally it returns attachment value.
- *
+ *
* @param <A> class type
* @param attachment attachment
* @param unit deployment unit
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -4,7 +4,7 @@
/**
* Deployment builder interface.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
interface DeploymentModelBuilder
@@ -12,7 +12,7 @@
/**
* Creates Web Service deployment model and associates it with deployment.
- *
+ *
* @param unit deployment unit
*/
void newDeploymentModel(DeploymentUnit unit);
Added: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.endpoint;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * JAXWS HTTP server implementation that nestles inside JBoss AS.
+ * This implementation simply delegates deployment of dynamically created
+ * JBoss web deployment to JBoss main deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class EndpointAPIHttpServer extends AbstractExtensible implements HttpServer
+{
+
+ /** JBoss deployment factory. */
+ private final DeploymentFactory factory = new DeploymentFactory();
+ /** JBoss Main deployer. */
+ private final DeployerClient mainDeployer;
+ /** JBossWS SPI provider. */
+ private final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ /** Registered deployments. */
+ private final Map<String, Deployment> deployments = new HashMap<String, Deployment>();
+
+ /**
+ * Constructor - invoked by MC.
+ *
+ * @param mainDeployer JBoss main deployer
+ */
+ public EndpointAPIHttpServer(final DeployerClient mainDeployer)
+ {
+ super();
+ this.mainDeployer = mainDeployer;
+ }
+
+ /**
+ * Starts an instance of this HTTP server.
+ */
+ public void start()
+ {
+ // Nothing to start, we're running inside JBoss AS
+ }
+
+ /**
+ * Creates an requested HTTP context.
+ *
+ * @param contextRoot context root name
+ * @return context instance
+ */
+ public synchronized HttpContext createContext(final String contextRoot)
+ {
+ return this.spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ }
+
+ /**
+ * Publishes a JAXWS endpoint to the JBoss server.
+ *
+ * @param context web context
+ * @param endpoint to publish
+ */
+ public synchronized void publish(final HttpContext context, final Endpoint endpoint)
+ {
+ final String contextRoot = context.getContextRoot();
+ if (this.deployments.keySet().contains(contextRoot))
+ {
+ throw new WSFDeploymentException("Context root '" + contextRoot + "' already exists");
+ }
+
+ final Class<?> endpointClass = this.getEndpointClass(endpoint);
+ final ClassLoader endpointClassLoader = endpointClass.getClassLoader();
+ final Deployment deployment = this.createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
+ final MutableAttachments mutableAttachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
+ final JBossWebMetaData jbossWebMD = this.newJBossWebMetaData(contextRoot, endpointClass);
+
+ mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbossWebMD);
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(endpointClassLoader));
+ mutableAttachments.addAttachment(Module.class, ClassLoading.getModuleForClassLoader(endpointClassLoader));
+
+ try
+ {
+ this.mainDeployer.deploy(deployment);
+ this.deployments.put(contextRoot, deployment);
+ }
+ catch (DeploymentException de)
+ {
+ WSFDeploymentException.rethrow(de);
+ }
+ }
+
+ /**
+ * Destroys dynamically published JAXWS endpoint on the JBoss server.
+ *
+ * @param context to be destroyed
+ * @param endpoint to be unpublished
+ */
+ public synchronized void destroy(final HttpContext context, final Endpoint endpoint)
+ {
+ try
+ {
+ final String contextRoot = context.getContextRoot();
+ final Deployment deployment = this.deployments.remove(contextRoot);
+ if (deployment != null)
+ {
+ this.mainDeployer.undeploy(deployment);
+ }
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ /**
+ * Returns implementor class associated with endpoint.
+ *
+ * @param endpoint to get implementor class from
+ * @return implementor class
+ */
+ private Class<?> getEndpointClass(final Endpoint endpoint)
+ {
+ final Object implementor = endpoint.getImplementor();
+ return implementor instanceof Class<?> ? (Class<?>) implementor : implementor.getClass();
+ }
+
+ /**
+ * Creates new JBoss web meta data.
+ *
+ * @param contextRoot context root
+ * @param endpointClass endpoint class
+ * @return new JBoss web meta data
+ */
+ private JBossWebMetaData newJBossWebMetaData(final String contextRoot, final Class<?> endpointClass)
+ {
+ final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+ final JBossServletsMetaData servletsMD = WebMetaDataHelper.getServlets(jbossWebMD);
+ final List<ServletMappingMetaData> servletMappingMD = WebMetaDataHelper.getServletMappings(jbossWebMD);
+ final String servletName = "jaxws-dynamic-endpoint";
+
+ WebMetaDataHelper.newServlet(servletName, endpointClass.getName(), servletsMD);
+ WebMetaDataHelper.newServletMapping(servletName, WebMetaDataHelper.getUrlPatterns("/*"), servletMappingMD);
+ jbossWebMD.setContextRoot(contextRoot);
+
+ return jbossWebMD;
+ }
+
+ /**
+ * Creates simple web deployment using deployers client api.
+ *
+ * @param name deployment name
+ * @return new deployment
+ */
+ private Deployment createSimpleDeployment(final String name)
+ {
+ final Deployment unit = new AbstractDeployment(name);
+ this.factory.addContext(unit, "");
+
+ return unit;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory
+ */
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ /** Delegee. */
+ private ClassLoader classLoader;
+
+ /**
+ * Constructor.
+ *
+ * @param classLoader class loader
+ */
+ public ContextClassLoaderFactory(final ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#createClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @return class loader
+ * @throws Exception never thrown in our case
+ */
+ public ClassLoader createClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ return this.classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#removeClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @throws Exception never thrown in our case
+ */
+ public void removeClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ this.classLoader = null;
+ }
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -41,6 +41,7 @@
abstract class AbstractMetaDataBuilderEJB
{
+ /** Logger. */
protected final Logger log = Logger.getLogger(this.getClass());
/**
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -32,6 +32,7 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -266,7 +267,7 @@
/**
* Creates login-config part of web.xml descriptor.
- *
+ *
* <pre>
* <login-config>
* <auth-method>EjbDeploymentAuthMethod</auth-method>
Deleted: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -1,424 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.AuthConstraintMetaData;
-import org.jboss.metadata.web.spec.LoginConfigMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.metadata.web.spec.TransportGuaranteeType;
-import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-
-/**
- * Utility class that simplifies work with JBossWebMetaData object structure.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-final class WebMetaDataHelper
-{
-
- /** Star utility string. */
- private static final String STAR_STRING = "*";
-
- /** GET http method utility string. */
- private static final String GET_STRING = "GET";
-
- /** POST http method utility string. */
- private static final String POST_STRING = "POST";
-
- /** GET and POST methods utility list. */
- private static List<String> getAndPostMethods;
-
- /** POST method utility list. */
- private static List<String> onlyPostMethod;
-
- /** All roles utility list. */
- private static List<String> allRoles;
-
- static
- {
- final List<String> getAndPostList = new LinkedList<String>();
- getAndPostList.add(WebMetaDataHelper.GET_STRING);
- getAndPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
-
- final List<String> onlyPostList = new LinkedList<String>();
- onlyPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
-
- final List<String> roleNamesList = new LinkedList<String>();
- roleNamesList.add(WebMetaDataHelper.STAR_STRING);
- WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
- }
-
- /**
- * Constructor.
- */
- private WebMetaDataHelper()
- {
- super();
- }
-
- /**
- * Creates URL pattern list from passed string.
- *
- * @param urlPattern URL pattern
- * @return list wrapping passed parameter
- */
- static List<String> getUrlPatterns(final String urlPattern)
- {
- final List<String> linkedList = new LinkedList<String>();
-
- linkedList.add(urlPattern);
-
- return linkedList;
- }
-
- /**
- * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
- *
- * @param secureWsdlAccess whether WSDL is secured
- * @return web access methods
- */
- static List<String> getHttpMethods(final boolean secureWsdlAccess)
- {
- return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
- }
-
- /**
- * Returns all role list.
- *
- * @return all role list
- */
- static List<String> getAllRoles()
- {
- return WebMetaDataHelper.allRoles;
- }
-
- /**
- * Gests servlets meta data from jboss web meta data.
- * If not found it creates new servlets meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlets meta data
- */
- static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
- {
- JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
-
- if (servletsMD == null)
- {
- servletsMD = new JBossServletsMetaData();
- jbossWebMD.setServlets(servletsMD);
- }
-
- return servletsMD;
- }
-
- /**
- * Gests servlet mappings meta data from jboss web meta data.
- * If not found it creates new servlet mappings meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlet mappings meta data
- */
- static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
- {
- List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
-
- if (servletMappingsMD == null)
- {
- servletMappingsMD = new LinkedList<ServletMappingMetaData>();
- jbossWebMD.setServletMappings(servletMappingsMD);
- }
-
- return servletMappingsMD;
- }
-
- /**
- * Gests security constraints meta data from jboss web meta data.
- * If not found it creates new security constraints meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return security constraints meta data
- */
- static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
- {
- List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
-
- if (securityConstraintsMD == null)
- {
- securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
- jbossWebMD.setSecurityContraints(securityConstraintsMD);
- }
-
- return securityConstraintsMD;
- }
-
- /**
- * Gests login config meta data from jboss web meta data.
- * If not found it creates new login config meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return login config meta data
- */
- static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
- {
- LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
-
- if (loginConfigMD == null)
- {
- loginConfigMD = new LoginConfigMetaData();
- jbossWebMD.setLoginConfig(loginConfigMD);
- }
-
- return loginConfigMD;
- }
-
- /**
- * Gests context parameters meta data from jboss web meta data.
- * If not found it creates new context parameters meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return context parameters meta data
- */
- static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
- {
- List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
-
- if (contextParamsMD == null)
- {
- contextParamsMD = new LinkedList<ParamValueMetaData>();
- jbossWebMD.setContextParams(contextParamsMD);
- }
-
- return contextParamsMD;
- }
-
- /**
- * Gests web resource collections meta data from security constraint meta data.
- * If not found it creates new web resource collections meta data
- * and associates them with security constraint meta data.
- *
- * @param securityConstraintMD security constraint meta data
- * @return web resource collections meta data
- */
- static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
- {
- WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
-
- if (webResourceCollectionsMD == null)
- {
- webResourceCollectionsMD = new WebResourceCollectionsMetaData();
- securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
- }
-
- return webResourceCollectionsMD;
- }
-
- /**
- * Gests init parameters meta data from servlet meta data.
- * If not found it creates new init parameters meta data
- * and associates them with servlet meta data.
- *
- * @param servletMD servlet meta data
- * @return init parameters meta data
- */
- static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
- {
- List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
-
- if (initParamsMD == null)
- {
- initParamsMD = new LinkedList<ParamValueMetaData>();
- servletMD.setInitParam(initParamsMD);
- }
-
- return initParamsMD;
- }
-
- /**
- * Creates new security constraint meta data and associates them with security constraints meta data.
- *
- * @param securityConstraintsMD security constraints meta data
- * @return new security constraing meta data
- */
- static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
- {
- final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
-
- securityConstraintsMD.add(securityConstraintMD);
-
- return securityConstraintMD;
- }
-
- /**
- * Creates new web resource collection meta data and associates them with web resource collections meta data.
- *
- * @param servletName servlet name
- * @param urlPattern URL pattern
- * @param securedWsdl whether WSDL access is secured
- * @param webResourceCollectionsMD web resource collections meta data
- * @return new web resource collection meta data
- */
- static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
- final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
- {
- final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
-
- webResourceCollectionMD.setWebResourceName(servletName);
- webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
- webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
- webResourceCollectionsMD.add(webResourceCollectionMD);
-
- return webResourceCollectionMD;
- }
-
- /**
- * Creates new servlet meta data and associates them with servlets meta data.
- *
- * @param servletName servlet name
- * @param servletClass servlet class name
- * @param servletsMD servlets meta data
- * @return new servlet meta data
- */
- static JBossServletMetaData newServlet(final String servletName, final String servletClass,
- final JBossServletsMetaData servletsMD)
- {
- final JBossServletMetaData servletMD = new JBossServletMetaData();
-
- servletMD.setServletName(servletName);
- servletMD.setServletClass(servletClass);
- servletsMD.add(servletMD);
-
- return servletMD;
- }
-
- /**
- * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
- *
- * @param servletName servlet name
- * @param urlPatterns URL patterns
- * @param servletMappingsMD servlet mapping meta data
- * @return new servlet mapping meta data
- */
- static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
- final List<ServletMappingMetaData> servletMappingsMD)
- {
- final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
-
- servletMappingMD.setServletName(servletName);
- servletMappingMD.setUrlPatterns(urlPatterns);
- servletMappingsMD.add(servletMappingMD);
-
- return servletMappingMD;
- }
-
- /**
- * Creates new authentication constraint and associates it with security constraint meta data.
- *
- * @param roleNames roles
- * @param securityConstraintMD security constraint meta data
- * @return new authentication constraint meta data
- */
- static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
-
- authConstraintMD.setRoleNames(roleNames);
- securityConstraintMD.setAuthConstraint(authConstraintMD);
-
- return authConstraintMD;
- }
-
- /**
- * Creates new user constraint meta data and associates it with security constraint meta data.
- *
- * @param transportGuarantee transport guarantee value
- * @param securityConstraintMD security constraint meta data
- * @return new user data constraint meta data
- */
- static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
- final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
-
- userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
- securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
-
- return userDataConstraintMD;
- }
-
- /**
- * Creates new parameter meta data and associates it with parameters meta data.
- *
- * @param key parameter key
- * @param value parameter value
- * @param paramsMD parameters meta data
- * @return new parameter meta data
- */
- static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
- {
- final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
-
- paramsMD.add(paramValueMD);
-
- return paramValueMD;
- }
-
- /**
- * Creates new parameter with specified key and value.
- *
- * @param key the key
- * @param value the value
- * @return new parameter
- */
- private static ParamValueMetaData newParamValue(final String key, final String value)
- {
- final ParamValueMetaData paramMD = new ParamValueMetaData();
-
- paramMD.setParamName(key);
- paramMD.setParamValue(value);
-
- return paramMD;
- }
-
-}
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -29,6 +29,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSConstants;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
Added: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,424 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.util;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+
+/**
+ * Utility class that simplifies work with JBossWebMetaData object structure.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataHelper
+{
+
+ /** Star utility string. */
+ private static final String STAR_STRING = "*";
+
+ /** GET http method utility string. */
+ private static final String GET_STRING = "GET";
+
+ /** POST http method utility string. */
+ private static final String POST_STRING = "POST";
+
+ /** GET and POST methods utility list. */
+ private static List<String> getAndPostMethods;
+
+ /** POST method utility list. */
+ private static List<String> onlyPostMethod;
+
+ /** All roles utility list. */
+ private static List<String> allRoles;
+
+ static
+ {
+ final List<String> getAndPostList = new LinkedList<String>();
+ getAndPostList.add(WebMetaDataHelper.GET_STRING);
+ getAndPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
+
+ final List<String> onlyPostList = new LinkedList<String>();
+ onlyPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
+
+ final List<String> roleNamesList = new LinkedList<String>();
+ roleNamesList.add(WebMetaDataHelper.STAR_STRING);
+ WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
+ }
+
+ /**
+ * Constructor.
+ */
+ private WebMetaDataHelper()
+ {
+ super();
+ }
+
+ /**
+ * Creates URL pattern list from passed string.
+ *
+ * @param urlPattern URL pattern
+ * @return list wrapping passed parameter
+ */
+ public static List<String> getUrlPatterns(final String urlPattern)
+ {
+ final List<String> linkedList = new LinkedList<String>();
+
+ linkedList.add(urlPattern);
+
+ return linkedList;
+ }
+
+ /**
+ * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
+ *
+ * @param secureWsdlAccess whether WSDL is secured
+ * @return web access methods
+ */
+ public static List<String> getHttpMethods(final boolean secureWsdlAccess)
+ {
+ return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
+ }
+
+ /**
+ * Returns all role list.
+ *
+ * @return all role list
+ */
+ public static List<String> getAllRoles()
+ {
+ return WebMetaDataHelper.allRoles;
+ }
+
+ /**
+ * Gests servlets meta data from jboss web meta data.
+ * If not found it creates new servlets meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlets meta data
+ */
+ public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
+ {
+ JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
+
+ if (servletsMD == null)
+ {
+ servletsMD = new JBossServletsMetaData();
+ jbossWebMD.setServlets(servletsMD);
+ }
+
+ return servletsMD;
+ }
+
+ /**
+ * Gests servlet mappings meta data from jboss web meta data.
+ * If not found it creates new servlet mappings meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet mappings meta data
+ */
+ public static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
+ {
+ List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
+
+ if (servletMappingsMD == null)
+ {
+ servletMappingsMD = new LinkedList<ServletMappingMetaData>();
+ jbossWebMD.setServletMappings(servletMappingsMD);
+ }
+
+ return servletMappingsMD;
+ }
+
+ /**
+ * Gests security constraints meta data from jboss web meta data.
+ * If not found it creates new security constraints meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return security constraints meta data
+ */
+ public static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
+ {
+ List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
+
+ if (securityConstraintsMD == null)
+ {
+ securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
+ jbossWebMD.setSecurityContraints(securityConstraintsMD);
+ }
+
+ return securityConstraintsMD;
+ }
+
+ /**
+ * Gests login config meta data from jboss web meta data.
+ * If not found it creates new login config meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return login config meta data
+ */
+ public static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
+ {
+ LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
+
+ if (loginConfigMD == null)
+ {
+ loginConfigMD = new LoginConfigMetaData();
+ jbossWebMD.setLoginConfig(loginConfigMD);
+ }
+
+ return loginConfigMD;
+ }
+
+ /**
+ * Gests context parameters meta data from jboss web meta data.
+ * If not found it creates new context parameters meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return context parameters meta data
+ */
+ public static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
+ {
+ List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
+
+ if (contextParamsMD == null)
+ {
+ contextParamsMD = new LinkedList<ParamValueMetaData>();
+ jbossWebMD.setContextParams(contextParamsMD);
+ }
+
+ return contextParamsMD;
+ }
+
+ /**
+ * Gests web resource collections meta data from security constraint meta data.
+ * If not found it creates new web resource collections meta data
+ * and associates them with security constraint meta data.
+ *
+ * @param securityConstraintMD security constraint meta data
+ * @return web resource collections meta data
+ */
+ public static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
+ {
+ WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
+
+ if (webResourceCollectionsMD == null)
+ {
+ webResourceCollectionsMD = new WebResourceCollectionsMetaData();
+ securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
+ }
+
+ return webResourceCollectionsMD;
+ }
+
+ /**
+ * Gests init parameters meta data from servlet meta data.
+ * If not found it creates new init parameters meta data
+ * and associates them with servlet meta data.
+ *
+ * @param servletMD servlet meta data
+ * @return init parameters meta data
+ */
+ public static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
+ {
+ List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
+
+ if (initParamsMD == null)
+ {
+ initParamsMD = new LinkedList<ParamValueMetaData>();
+ servletMD.setInitParam(initParamsMD);
+ }
+
+ return initParamsMD;
+ }
+
+ /**
+ * Creates new security constraint meta data and associates them with security constraints meta data.
+ *
+ * @param securityConstraintsMD security constraints meta data
+ * @return new security constraing meta data
+ */
+ public static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
+ {
+ final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
+
+ securityConstraintsMD.add(securityConstraintMD);
+
+ return securityConstraintMD;
+ }
+
+ /**
+ * Creates new web resource collection meta data and associates them with web resource collections meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPattern URL pattern
+ * @param securedWsdl whether WSDL access is secured
+ * @param webResourceCollectionsMD web resource collections meta data
+ * @return new web resource collection meta data
+ */
+ public static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
+ final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
+ {
+ final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
+
+ webResourceCollectionMD.setWebResourceName(servletName);
+ webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
+ webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
+ webResourceCollectionsMD.add(webResourceCollectionMD);
+
+ return webResourceCollectionMD;
+ }
+
+ /**
+ * Creates new servlet meta data and associates them with servlets meta data.
+ *
+ * @param servletName servlet name
+ * @param servletClass servlet class name
+ * @param servletsMD servlets meta data
+ * @return new servlet meta data
+ */
+ public static JBossServletMetaData newServlet(final String servletName, final String servletClass,
+ final JBossServletsMetaData servletsMD)
+ {
+ final JBossServletMetaData servletMD = new JBossServletMetaData();
+
+ servletMD.setServletName(servletName);
+ servletMD.setServletClass(servletClass);
+ servletsMD.add(servletMD);
+
+ return servletMD;
+ }
+
+ /**
+ * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPatterns URL patterns
+ * @param servletMappingsMD servlet mapping meta data
+ * @return new servlet mapping meta data
+ */
+ public static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
+ final List<ServletMappingMetaData> servletMappingsMD)
+ {
+ final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
+
+ servletMappingMD.setServletName(servletName);
+ servletMappingMD.setUrlPatterns(urlPatterns);
+ servletMappingsMD.add(servletMappingMD);
+
+ return servletMappingMD;
+ }
+
+ /**
+ * Creates new authentication constraint and associates it with security constraint meta data.
+ *
+ * @param roleNames roles
+ * @param securityConstraintMD security constraint meta data
+ * @return new authentication constraint meta data
+ */
+ public static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
+
+ authConstraintMD.setRoleNames(roleNames);
+ securityConstraintMD.setAuthConstraint(authConstraintMD);
+
+ return authConstraintMD;
+ }
+
+ /**
+ * Creates new user constraint meta data and associates it with security constraint meta data.
+ *
+ * @param transportGuarantee transport guarantee value
+ * @param securityConstraintMD security constraint meta data
+ * @return new user data constraint meta data
+ */
+ public static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
+ final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
+
+ userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
+ securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
+
+ return userDataConstraintMD;
+ }
+
+ /**
+ * Creates new parameter meta data and associates it with parameters meta data.
+ *
+ * @param key parameter key
+ * @param value parameter value
+ * @param paramsMD parameters meta data
+ * @return new parameter meta data
+ */
+ public static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
+ {
+ final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
+
+ paramsMD.add(paramValueMD);
+
+ return paramValueMD;
+ }
+
+ /**
+ * Creates new parameter with specified key and value.
+ *
+ * @param key the key
+ * @param value the value
+ * @return new parameter
+ */
+ private static ParamValueMetaData newParamValue(final String key, final String value)
+ {
+ final ParamValueMetaData paramMD = new ParamValueMetaData();
+
+ paramMD.setParamName(key);
+ paramMD.setParamValue(value);
+
+ return paramMD;
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 10:42:05 UTC (rev 10748)
@@ -12,6 +12,15 @@
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
+ <!-- Endpoint API http server -->
+ <bean name="WSHTTPServer" class="org.jboss.webservices.integration.endpoint.EndpointAPIHttpServer">
+ <constructor>
+ <parameter>
+ <inject bean="MainDeployer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig" class="org.jboss.webservices.integration.config.ServerConfigImpl">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
Modified: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -12,6 +12,7 @@
import org.jboss.metadata.serviceref.VirtualFileAdaptor;
import org.jboss.virtual.VirtualFile;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
@@ -24,7 +25,7 @@
/**
* Base class for all deployment model builders.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
@@ -53,7 +54,7 @@
/**
* @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
- *
+ *
* @param unit deployment unit
*/
public final void newDeploymentModel(final DeploymentUnit unit)
@@ -68,7 +69,7 @@
/**
* Template method for subclasses to implement.
- *
+ *
* @param dep webservice deployment
* @param unit deployment unit
*/
@@ -76,7 +77,7 @@
/**
* Creates new Web Service endpoint.
- *
+ *
* @param endpointClass endpoint class name
* @param endpointName endpoint name
* @param dep deployment
@@ -103,7 +104,7 @@
/**
* Creates new Web Service deployment.
- *
+ *
* @param unit deployment unit
* @return archive deployment
*/
@@ -142,7 +143,14 @@
dep.setParent(parentDep);
}
- dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ if (unit instanceof VFSDeploymentUnit)
+ {
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+ }
+ else
+ {
+ dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
+ }
dep.setRuntimeClassLoader(unit.getClassLoader());
final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
dep.setType(deploymentType);
@@ -152,7 +160,7 @@
/**
* Creates new archive deployment.
- *
+ *
* @param name deployment name
* @param loader deployment loader
* @return new archive deployment
@@ -166,7 +174,7 @@
* Gets specified attachment from deployment unit.
* Checks it's not null and then propagates it to <b>dep</b>
* attachments. Finally it returns attachment value.
- *
+ *
* @param <A> class type
* @param attachment attachment
* @param unit deployment unit
Modified: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -4,7 +4,7 @@
/**
* Deployment builder interface.
- *
+ *
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
interface DeploymentModelBuilder
@@ -12,7 +12,7 @@
/**
* Creates Web Service deployment model and associates it with deployment.
- *
+ *
* @param unit deployment unit
*/
void newDeploymentModel(DeploymentUnit unit);
Added: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.endpoint;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * JAXWS HTTP server implementation that nestles inside JBoss AS.
+ * This implementation simply delegates deployment of dynamically created
+ * JBoss web deployment to JBoss main deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class EndpointAPIHttpServer extends AbstractExtensible implements HttpServer
+{
+
+ /** JBoss deployment factory. */
+ private final DeploymentFactory factory = new DeploymentFactory();
+ /** JBoss Main deployer. */
+ private final DeployerClient mainDeployer;
+ /** JBossWS SPI provider. */
+ private final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ /** Registered deployments. */
+ private final Map<String, Deployment> deployments = new HashMap<String, Deployment>();
+
+ /**
+ * Constructor - invoked by MC.
+ *
+ * @param mainDeployer JBoss main deployer
+ */
+ public EndpointAPIHttpServer(final DeployerClient mainDeployer)
+ {
+ super();
+ this.mainDeployer = mainDeployer;
+ }
+
+ /**
+ * Starts an instance of this HTTP server.
+ */
+ public void start()
+ {
+ // Nothing to start, we're running inside JBoss AS
+ }
+
+ /**
+ * Creates an requested HTTP context.
+ *
+ * @param contextRoot context root name
+ * @return context instance
+ */
+ public synchronized HttpContext createContext(final String contextRoot)
+ {
+ return this.spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ }
+
+ /**
+ * Publishes a JAXWS endpoint to the JBoss server.
+ *
+ * @param context web context
+ * @param endpoint to publish
+ */
+ public synchronized void publish(final HttpContext context, final Endpoint endpoint)
+ {
+ final String contextRoot = context.getContextRoot();
+ if (this.deployments.keySet().contains(contextRoot))
+ {
+ throw new WSFDeploymentException("Context root '" + contextRoot + "' already exists");
+ }
+
+ final Class<?> endpointClass = this.getEndpointClass(endpoint);
+ final ClassLoader endpointClassLoader = endpointClass.getClassLoader();
+ final Deployment deployment = this.createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
+ final MutableAttachments mutableAttachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
+ final JBossWebMetaData jbossWebMD = this.newJBossWebMetaData(contextRoot, endpointClass);
+
+ mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbossWebMD);
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(endpointClassLoader));
+ mutableAttachments.addAttachment(Module.class, ClassLoading.getModuleForClassLoader(endpointClassLoader));
+
+ try
+ {
+ this.mainDeployer.deploy(deployment);
+ this.deployments.put(contextRoot, deployment);
+ }
+ catch (DeploymentException de)
+ {
+ WSFDeploymentException.rethrow(de);
+ }
+ }
+
+ /**
+ * Destroys dynamically published JAXWS endpoint on the JBoss server.
+ *
+ * @param context to be destroyed
+ * @param endpoint to be unpublished
+ */
+ public synchronized void destroy(final HttpContext context, final Endpoint endpoint)
+ {
+ try
+ {
+ final String contextRoot = context.getContextRoot();
+ final Deployment deployment = this.deployments.remove(contextRoot);
+ if (deployment != null)
+ {
+ this.mainDeployer.undeploy(deployment);
+ }
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ /**
+ * Returns implementor class associated with endpoint.
+ *
+ * @param endpoint to get implementor class from
+ * @return implementor class
+ */
+ private Class<?> getEndpointClass(final Endpoint endpoint)
+ {
+ final Object implementor = endpoint.getImplementor();
+ return implementor instanceof Class<?> ? (Class<?>) implementor : implementor.getClass();
+ }
+
+ /**
+ * Creates new JBoss web meta data.
+ *
+ * @param contextRoot context root
+ * @param endpointClass endpoint class
+ * @return new JBoss web meta data
+ */
+ private JBossWebMetaData newJBossWebMetaData(final String contextRoot, final Class<?> endpointClass)
+ {
+ final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+ final JBossServletsMetaData servletsMD = WebMetaDataHelper.getServlets(jbossWebMD);
+ final List<ServletMappingMetaData> servletMappingMD = WebMetaDataHelper.getServletMappings(jbossWebMD);
+ final String servletName = "jaxws-dynamic-endpoint";
+
+ WebMetaDataHelper.newServlet(servletName, endpointClass.getName(), servletsMD);
+ WebMetaDataHelper.newServletMapping(servletName, WebMetaDataHelper.getUrlPatterns("/*"), servletMappingMD);
+ jbossWebMD.setContextRoot(contextRoot);
+
+ return jbossWebMD;
+ }
+
+ /**
+ * Creates simple web deployment using deployers client api.
+ *
+ * @param name deployment name
+ * @return new deployment
+ */
+ private Deployment createSimpleDeployment(final String name)
+ {
+ final Deployment unit = new AbstractDeployment(name);
+ this.factory.addContext(unit, "");
+
+ return unit;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory
+ */
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ /** Delegee. */
+ private ClassLoader classLoader;
+
+ /**
+ * Constructor.
+ *
+ * @param classLoader class loader
+ */
+ public ContextClassLoaderFactory(final ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#createClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @return class loader
+ * @throws Exception never thrown in our case
+ */
+ public ClassLoader createClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ return this.classLoader;
+ }
+
+ /**
+ * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#removeClassLoader(DeploymentUnit)
+ *
+ * @param unit deployment unit
+ * @throws Exception never thrown in our case
+ */
+ public void removeClassLoader(final DeploymentUnit unit) throws Exception
+ {
+ this.classLoader = null;
+ }
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -41,6 +41,7 @@
abstract class AbstractMetaDataBuilderEJB
{
+ /** Logger. */
protected final Logger log = Logger.getLogger(this.getClass());
/**
Modified: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -32,6 +32,7 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -266,7 +267,7 @@
/**
* Creates login-config part of web.xml descriptor.
- *
+ *
* <pre>
* <login-config>
* <auth-method>EjbDeploymentAuthMethod</auth-method>
Deleted: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -1,424 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.metadata.javaee.spec.ParamValueMetaData;
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.AuthConstraintMetaData;
-import org.jboss.metadata.web.spec.LoginConfigMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.ServletMetaData;
-import org.jboss.metadata.web.spec.TransportGuaranteeType;
-import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-
-/**
- * Utility class that simplifies work with JBossWebMetaData object structure.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-final class WebMetaDataHelper
-{
-
- /** Star utility string. */
- private static final String STAR_STRING = "*";
-
- /** GET http method utility string. */
- private static final String GET_STRING = "GET";
-
- /** POST http method utility string. */
- private static final String POST_STRING = "POST";
-
- /** GET and POST methods utility list. */
- private static List<String> getAndPostMethods;
-
- /** POST method utility list. */
- private static List<String> onlyPostMethod;
-
- /** All roles utility list. */
- private static List<String> allRoles;
-
- static
- {
- final List<String> getAndPostList = new LinkedList<String>();
- getAndPostList.add(WebMetaDataHelper.GET_STRING);
- getAndPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
-
- final List<String> onlyPostList = new LinkedList<String>();
- onlyPostList.add(WebMetaDataHelper.POST_STRING);
- WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
-
- final List<String> roleNamesList = new LinkedList<String>();
- roleNamesList.add(WebMetaDataHelper.STAR_STRING);
- WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
- }
-
- /**
- * Constructor.
- */
- private WebMetaDataHelper()
- {
- super();
- }
-
- /**
- * Creates URL pattern list from passed string.
- *
- * @param urlPattern URL pattern
- * @return list wrapping passed parameter
- */
- static List<String> getUrlPatterns(final String urlPattern)
- {
- final List<String> linkedList = new LinkedList<String>();
-
- linkedList.add(urlPattern);
-
- return linkedList;
- }
-
- /**
- * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
- *
- * @param secureWsdlAccess whether WSDL is secured
- * @return web access methods
- */
- static List<String> getHttpMethods(final boolean secureWsdlAccess)
- {
- return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
- }
-
- /**
- * Returns all role list.
- *
- * @return all role list
- */
- static List<String> getAllRoles()
- {
- return WebMetaDataHelper.allRoles;
- }
-
- /**
- * Gests servlets meta data from jboss web meta data.
- * If not found it creates new servlets meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlets meta data
- */
- static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
- {
- JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
-
- if (servletsMD == null)
- {
- servletsMD = new JBossServletsMetaData();
- jbossWebMD.setServlets(servletsMD);
- }
-
- return servletsMD;
- }
-
- /**
- * Gests servlet mappings meta data from jboss web meta data.
- * If not found it creates new servlet mappings meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return servlet mappings meta data
- */
- static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
- {
- List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
-
- if (servletMappingsMD == null)
- {
- servletMappingsMD = new LinkedList<ServletMappingMetaData>();
- jbossWebMD.setServletMappings(servletMappingsMD);
- }
-
- return servletMappingsMD;
- }
-
- /**
- * Gests security constraints meta data from jboss web meta data.
- * If not found it creates new security constraints meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return security constraints meta data
- */
- static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
- {
- List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
-
- if (securityConstraintsMD == null)
- {
- securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
- jbossWebMD.setSecurityContraints(securityConstraintsMD);
- }
-
- return securityConstraintsMD;
- }
-
- /**
- * Gests login config meta data from jboss web meta data.
- * If not found it creates new login config meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return login config meta data
- */
- static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
- {
- LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
-
- if (loginConfigMD == null)
- {
- loginConfigMD = new LoginConfigMetaData();
- jbossWebMD.setLoginConfig(loginConfigMD);
- }
-
- return loginConfigMD;
- }
-
- /**
- * Gests context parameters meta data from jboss web meta data.
- * If not found it creates new context parameters meta data
- * and associates them with jboss web meta data.
- *
- * @param jbossWebMD jboss web meta data
- * @return context parameters meta data
- */
- static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
- {
- List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
-
- if (contextParamsMD == null)
- {
- contextParamsMD = new LinkedList<ParamValueMetaData>();
- jbossWebMD.setContextParams(contextParamsMD);
- }
-
- return contextParamsMD;
- }
-
- /**
- * Gests web resource collections meta data from security constraint meta data.
- * If not found it creates new web resource collections meta data
- * and associates them with security constraint meta data.
- *
- * @param securityConstraintMD security constraint meta data
- * @return web resource collections meta data
- */
- static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
- {
- WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
-
- if (webResourceCollectionsMD == null)
- {
- webResourceCollectionsMD = new WebResourceCollectionsMetaData();
- securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
- }
-
- return webResourceCollectionsMD;
- }
-
- /**
- * Gests init parameters meta data from servlet meta data.
- * If not found it creates new init parameters meta data
- * and associates them with servlet meta data.
- *
- * @param servletMD servlet meta data
- * @return init parameters meta data
- */
- static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
- {
- List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
-
- if (initParamsMD == null)
- {
- initParamsMD = new LinkedList<ParamValueMetaData>();
- servletMD.setInitParam(initParamsMD);
- }
-
- return initParamsMD;
- }
-
- /**
- * Creates new security constraint meta data and associates them with security constraints meta data.
- *
- * @param securityConstraintsMD security constraints meta data
- * @return new security constraing meta data
- */
- static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
- {
- final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
-
- securityConstraintsMD.add(securityConstraintMD);
-
- return securityConstraintMD;
- }
-
- /**
- * Creates new web resource collection meta data and associates them with web resource collections meta data.
- *
- * @param servletName servlet name
- * @param urlPattern URL pattern
- * @param securedWsdl whether WSDL access is secured
- * @param webResourceCollectionsMD web resource collections meta data
- * @return new web resource collection meta data
- */
- static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
- final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
- {
- final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
-
- webResourceCollectionMD.setWebResourceName(servletName);
- webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
- webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
- webResourceCollectionsMD.add(webResourceCollectionMD);
-
- return webResourceCollectionMD;
- }
-
- /**
- * Creates new servlet meta data and associates them with servlets meta data.
- *
- * @param servletName servlet name
- * @param servletClass servlet class name
- * @param servletsMD servlets meta data
- * @return new servlet meta data
- */
- static JBossServletMetaData newServlet(final String servletName, final String servletClass,
- final JBossServletsMetaData servletsMD)
- {
- final JBossServletMetaData servletMD = new JBossServletMetaData();
-
- servletMD.setServletName(servletName);
- servletMD.setServletClass(servletClass);
- servletsMD.add(servletMD);
-
- return servletMD;
- }
-
- /**
- * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
- *
- * @param servletName servlet name
- * @param urlPatterns URL patterns
- * @param servletMappingsMD servlet mapping meta data
- * @return new servlet mapping meta data
- */
- static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
- final List<ServletMappingMetaData> servletMappingsMD)
- {
- final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
-
- servletMappingMD.setServletName(servletName);
- servletMappingMD.setUrlPatterns(urlPatterns);
- servletMappingsMD.add(servletMappingMD);
-
- return servletMappingMD;
- }
-
- /**
- * Creates new authentication constraint and associates it with security constraint meta data.
- *
- * @param roleNames roles
- * @param securityConstraintMD security constraint meta data
- * @return new authentication constraint meta data
- */
- static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
-
- authConstraintMD.setRoleNames(roleNames);
- securityConstraintMD.setAuthConstraint(authConstraintMD);
-
- return authConstraintMD;
- }
-
- /**
- * Creates new user constraint meta data and associates it with security constraint meta data.
- *
- * @param transportGuarantee transport guarantee value
- * @param securityConstraintMD security constraint meta data
- * @return new user data constraint meta data
- */
- static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
- final SecurityConstraintMetaData securityConstraintMD)
- {
- final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
- final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
-
- userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
- securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
-
- return userDataConstraintMD;
- }
-
- /**
- * Creates new parameter meta data and associates it with parameters meta data.
- *
- * @param key parameter key
- * @param value parameter value
- * @param paramsMD parameters meta data
- * @return new parameter meta data
- */
- static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
- {
- final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
-
- paramsMD.add(paramValueMD);
-
- return paramValueMD;
- }
-
- /**
- * Creates new parameter with specified key and value.
- *
- * @param key the key
- * @param value the value
- * @return new parameter
- */
- private static ParamValueMetaData newParamValue(final String key, final String value)
- {
- final ParamValueMetaData paramMD = new ParamValueMetaData();
-
- paramMD.setParamName(key);
- paramMD.setParamValue(value);
-
- return paramMD;
- }
-
-}
Modified: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -29,6 +29,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSConstants;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
Added: container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java (rev 0)
+++ container/jboss50/branches/jbossws-jboss510/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java 2009-09-23 10:42:05 UTC (rev 10748)
@@ -0,0 +1,424 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.util;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+
+/**
+ * Utility class that simplifies work with JBossWebMetaData object structure.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataHelper
+{
+
+ /** Star utility string. */
+ private static final String STAR_STRING = "*";
+
+ /** GET http method utility string. */
+ private static final String GET_STRING = "GET";
+
+ /** POST http method utility string. */
+ private static final String POST_STRING = "POST";
+
+ /** GET and POST methods utility list. */
+ private static List<String> getAndPostMethods;
+
+ /** POST method utility list. */
+ private static List<String> onlyPostMethod;
+
+ /** All roles utility list. */
+ private static List<String> allRoles;
+
+ static
+ {
+ final List<String> getAndPostList = new LinkedList<String>();
+ getAndPostList.add(WebMetaDataHelper.GET_STRING);
+ getAndPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
+
+ final List<String> onlyPostList = new LinkedList<String>();
+ onlyPostList.add(WebMetaDataHelper.POST_STRING);
+ WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
+
+ final List<String> roleNamesList = new LinkedList<String>();
+ roleNamesList.add(WebMetaDataHelper.STAR_STRING);
+ WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
+ }
+
+ /**
+ * Constructor.
+ */
+ private WebMetaDataHelper()
+ {
+ super();
+ }
+
+ /**
+ * Creates URL pattern list from passed string.
+ *
+ * @param urlPattern URL pattern
+ * @return list wrapping passed parameter
+ */
+ public static List<String> getUrlPatterns(final String urlPattern)
+ {
+ final List<String> linkedList = new LinkedList<String>();
+
+ linkedList.add(urlPattern);
+
+ return linkedList;
+ }
+
+ /**
+ * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
+ *
+ * @param secureWsdlAccess whether WSDL is secured
+ * @return web access methods
+ */
+ public static List<String> getHttpMethods(final boolean secureWsdlAccess)
+ {
+ return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
+ }
+
+ /**
+ * Returns all role list.
+ *
+ * @return all role list
+ */
+ public static List<String> getAllRoles()
+ {
+ return WebMetaDataHelper.allRoles;
+ }
+
+ /**
+ * Gests servlets meta data from jboss web meta data.
+ * If not found it creates new servlets meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlets meta data
+ */
+ public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
+ {
+ JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
+
+ if (servletsMD == null)
+ {
+ servletsMD = new JBossServletsMetaData();
+ jbossWebMD.setServlets(servletsMD);
+ }
+
+ return servletsMD;
+ }
+
+ /**
+ * Gests servlet mappings meta data from jboss web meta data.
+ * If not found it creates new servlet mappings meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet mappings meta data
+ */
+ public static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
+ {
+ List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
+
+ if (servletMappingsMD == null)
+ {
+ servletMappingsMD = new LinkedList<ServletMappingMetaData>();
+ jbossWebMD.setServletMappings(servletMappingsMD);
+ }
+
+ return servletMappingsMD;
+ }
+
+ /**
+ * Gests security constraints meta data from jboss web meta data.
+ * If not found it creates new security constraints meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return security constraints meta data
+ */
+ public static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
+ {
+ List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityContraints();
+
+ if (securityConstraintsMD == null)
+ {
+ securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
+ jbossWebMD.setSecurityContraints(securityConstraintsMD);
+ }
+
+ return securityConstraintsMD;
+ }
+
+ /**
+ * Gests login config meta data from jboss web meta data.
+ * If not found it creates new login config meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return login config meta data
+ */
+ public static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
+ {
+ LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
+
+ if (loginConfigMD == null)
+ {
+ loginConfigMD = new LoginConfigMetaData();
+ jbossWebMD.setLoginConfig(loginConfigMD);
+ }
+
+ return loginConfigMD;
+ }
+
+ /**
+ * Gests context parameters meta data from jboss web meta data.
+ * If not found it creates new context parameters meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return context parameters meta data
+ */
+ public static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
+ {
+ List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
+
+ if (contextParamsMD == null)
+ {
+ contextParamsMD = new LinkedList<ParamValueMetaData>();
+ jbossWebMD.setContextParams(contextParamsMD);
+ }
+
+ return contextParamsMD;
+ }
+
+ /**
+ * Gests web resource collections meta data from security constraint meta data.
+ * If not found it creates new web resource collections meta data
+ * and associates them with security constraint meta data.
+ *
+ * @param securityConstraintMD security constraint meta data
+ * @return web resource collections meta data
+ */
+ public static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
+ {
+ WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
+
+ if (webResourceCollectionsMD == null)
+ {
+ webResourceCollectionsMD = new WebResourceCollectionsMetaData();
+ securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
+ }
+
+ return webResourceCollectionsMD;
+ }
+
+ /**
+ * Gests init parameters meta data from servlet meta data.
+ * If not found it creates new init parameters meta data
+ * and associates them with servlet meta data.
+ *
+ * @param servletMD servlet meta data
+ * @return init parameters meta data
+ */
+ public static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
+ {
+ List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
+
+ if (initParamsMD == null)
+ {
+ initParamsMD = new LinkedList<ParamValueMetaData>();
+ servletMD.setInitParam(initParamsMD);
+ }
+
+ return initParamsMD;
+ }
+
+ /**
+ * Creates new security constraint meta data and associates them with security constraints meta data.
+ *
+ * @param securityConstraintsMD security constraints meta data
+ * @return new security constraing meta data
+ */
+ public static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
+ {
+ final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
+
+ securityConstraintsMD.add(securityConstraintMD);
+
+ return securityConstraintMD;
+ }
+
+ /**
+ * Creates new web resource collection meta data and associates them with web resource collections meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPattern URL pattern
+ * @param securedWsdl whether WSDL access is secured
+ * @param webResourceCollectionsMD web resource collections meta data
+ * @return new web resource collection meta data
+ */
+ public static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
+ final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
+ {
+ final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
+
+ webResourceCollectionMD.setWebResourceName(servletName);
+ webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
+ webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
+ webResourceCollectionsMD.add(webResourceCollectionMD);
+
+ return webResourceCollectionMD;
+ }
+
+ /**
+ * Creates new servlet meta data and associates them with servlets meta data.
+ *
+ * @param servletName servlet name
+ * @param servletClass servlet class name
+ * @param servletsMD servlets meta data
+ * @return new servlet meta data
+ */
+ public static JBossServletMetaData newServlet(final String servletName, final String servletClass,
+ final JBossServletsMetaData servletsMD)
+ {
+ final JBossServletMetaData servletMD = new JBossServletMetaData();
+
+ servletMD.setServletName(servletName);
+ servletMD.setServletClass(servletClass);
+ servletsMD.add(servletMD);
+
+ return servletMD;
+ }
+
+ /**
+ * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
+ *
+ * @param servletName servlet name
+ * @param urlPatterns URL patterns
+ * @param servletMappingsMD servlet mapping meta data
+ * @return new servlet mapping meta data
+ */
+ public static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
+ final List<ServletMappingMetaData> servletMappingsMD)
+ {
+ final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
+
+ servletMappingMD.setServletName(servletName);
+ servletMappingMD.setUrlPatterns(urlPatterns);
+ servletMappingsMD.add(servletMappingMD);
+
+ return servletMappingMD;
+ }
+
+ /**
+ * Creates new authentication constraint and associates it with security constraint meta data.
+ *
+ * @param roleNames roles
+ * @param securityConstraintMD security constraint meta data
+ * @return new authentication constraint meta data
+ */
+ public static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
+
+ authConstraintMD.setRoleNames(roleNames);
+ securityConstraintMD.setAuthConstraint(authConstraintMD);
+
+ return authConstraintMD;
+ }
+
+ /**
+ * Creates new user constraint meta data and associates it with security constraint meta data.
+ *
+ * @param transportGuarantee transport guarantee value
+ * @param securityConstraintMD security constraint meta data
+ * @return new user data constraint meta data
+ */
+ public static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
+ final SecurityConstraintMetaData securityConstraintMD)
+ {
+ final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
+ final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
+
+ userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
+ securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
+
+ return userDataConstraintMD;
+ }
+
+ /**
+ * Creates new parameter meta data and associates it with parameters meta data.
+ *
+ * @param key parameter key
+ * @param value parameter value
+ * @param paramsMD parameters meta data
+ * @return new parameter meta data
+ */
+ public static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
+ {
+ final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
+
+ paramsMD.add(paramValueMD);
+
+ return paramValueMD;
+ }
+
+ /**
+ * Creates new parameter with specified key and value.
+ *
+ * @param key the key
+ * @param value the value
+ * @return new parameter
+ */
+ private static ParamValueMetaData newParamValue(final String key, final String value)
+ {
+ final ParamValueMetaData paramMD = new ParamValueMetaData();
+
+ paramMD.setParamName(key);
+ paramMD.setParamValue(value);
+
+ return paramMD;
+ }
+
+}
Modified: container/jboss50/branches/jbossws-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 03:31:04 UTC (rev 10747)
+++ container/jboss50/branches/jbossws-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-23 10:42:05 UTC (rev 10748)
@@ -12,6 +12,15 @@
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
+ <!-- Endpoint API http server -->
+ <bean name="WSHTTPServer" class="org.jboss.webservices.integration.endpoint.EndpointAPIHttpServer">
+ <constructor>
+ <parameter>
+ <inject bean="MainDeployer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig" class="org.jboss.webservices.integration.config.ServerConfigImpl">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
15 years, 5 months
JBossWS SVN: r10747 - stack/native/trunk/modules/resources/src/main/resources/bin.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-09-22 23:31:04 -0400 (Tue, 22 Sep 2009)
New Revision: 10747
Modified:
stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat
Log:
[JBWS-2760]:make the native windows bat scriptwork when JAVA_HOME not set
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-23 03:27:20 UTC (rev 10746)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-23 03:31:04 UTC (rev 10747)
@@ -8,14 +8,24 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVAC_JAR%
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-23 03:27:20 UTC (rev 10746)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-23 03:31:04 UTC (rev 10747)
@@ -8,14 +8,24 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVAC_JAR%
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-framework.jar
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-23 03:27:20 UTC (rev 10746)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-23 03:31:04 UTC (rev 10747)
@@ -31,7 +31,14 @@
goto loop
:endloop
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
Modified: stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat 2009-09-23 03:27:20 UTC (rev 10746)
+++ stack/native/trunk/modules/resources/src/main/resources/bin/wstools.bat 2009-09-23 03:31:04 UTC (rev 10747)
@@ -8,14 +8,24 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
if "%JBOSS_HOME%" == "" set JBOSS_HOME=%DIRNAME%\..
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Setup the wstools classpath
-set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JAVAC_JAR%
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSTOOLS_CLASSPATH=%WSTOOLS_CLASSPATH%;%JBOSS_HOME%/client/netty.jar
15 years, 5 months
JBossWS SVN: r10746 - stack/metro/trunk/modules/resources/src/main/resources/bin.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-09-22 23:27:20 -0400 (Tue, 22 Sep 2009)
New Revision: 10746
Modified:
stack/metro/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/metro/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/metro/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
Log:
[JBWS-2760]:make the metro windows bat script when JAVA_HOME not set
Modified: stack/metro/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/metro/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-23 03:26:05 UTC (rev 10745)
+++ stack/metro/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-23 03:27:20 UTC (rev 10746)
@@ -8,12 +8,22 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVAC_JAR%
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
Modified: stack/metro/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/metro/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-23 03:26:05 UTC (rev 10745)
+++ stack/metro/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-23 03:27:20 UTC (rev 10746)
@@ -8,12 +8,22 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem Shared libs
-set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVAC_JAR%
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-framework.jar
Modified: stack/metro/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/metro/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-23 03:26:05 UTC (rev 10745)
+++ stack/metro/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-23 03:27:20 UTC (rev 10746)
@@ -31,7 +31,14 @@
goto loop
:endloop
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
15 years, 5 months
JBossWS SVN: r10745 - stack/cxf/trunk/modules/resources/src/main/resources/bin.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-09-22 23:26:05 -0400 (Tue, 22 Sep 2009)
New Revision: 10745
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
stack/cxf/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
Log:
[JBWS-2760]:make the windows bat scrip when JAVA_HOME not set
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-22 14:23:29 UTC (rev 10744)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsconsume.bat 2009-09-23 03:26:05 UTC (rev 10745)
@@ -8,12 +8,22 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem shared libs
-set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JAVAC_JAR%
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/wstx.jar
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-22 14:23:29 UTC (rev 10744)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsprovide.bat 2009-09-23 03:26:05 UTC (rev 10745)
@@ -8,12 +8,21 @@
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+ if exist "%JAVA_HOME%\lib\tools.jar" (
+ set "JAVAC_JAR=%JAVA_HOME%\lib\tools.jar"
+ )
+)
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
rem shared libs
-set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVA_HOME%/lib/tools.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JAVAC_JAR%
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-spi.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-common.jar
set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-framework.jar
Modified: stack/cxf/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-22 14:23:29 UTC (rev 10744)
+++ stack/cxf/trunk/modules/resources/src/main/resources/bin/wsrunclient.bat 2009-09-23 03:26:05 UTC (rev 10745)
@@ -31,7 +31,14 @@
goto loop
:endloop
-set JAVA=%JAVA_HOME%\bin\java
+if "x%JAVA_HOME%" == "x" (
+ set JAVA=java
+ echo JAVA_HOME is not set. Unexpected results may occur.
+ echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
+) else (
+ set "JAVA=%JAVA_HOME%\bin\java"
+)
+
set JBOSS_HOME=%DIRNAME%\..
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
15 years, 5 months
JBossWS SVN: r10744 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-09-22 10:23:29 -0400 (Tue, 22 Sep 2009)
New Revision: 10744
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2770][CXF-1511] Updating excludes
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-09-22 11:01:42 UTC (rev 10743)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-09-22 14:23:29 UTC (rev 10744)
@@ -8,9 +8,6 @@
# [CXF-1510] Cannot handle anonymous bare requests
org/jboss/test/ws/jaxws/anonymous/**
-# [CXF-1511] WrappedMessageContext does not implement SOAPMessageContext
-org/jboss/test/ws/jaxws/binding/**
-
# [CXF-1516] Type inheritance with document/literal/bare
org/jboss/test/ws/jaxws/jbws1702/**
@@ -44,3 +41,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
+org/jboss/test/ws/jaxws/binding/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-09-22 11:01:42 UTC (rev 10743)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-09-22 14:23:29 UTC (rev 10744)
@@ -8,9 +8,6 @@
# [CXF-1510] Cannot handle anonymous bare requests
org/jboss/test/ws/jaxws/anonymous/**
-# [CXF-1511] WrappedMessageContext does not implement SOAPMessageContext
-org/jboss/test/ws/jaxws/binding/**
-
# [CXF-1516] Type inheritance with document/literal/bare
org/jboss/test/ws/jaxws/jbws1702/**
@@ -44,3 +41,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
+org/jboss/test/ws/jaxws/binding/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-09-22 11:01:42 UTC (rev 10743)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-09-22 14:23:29 UTC (rev 10744)
@@ -8,9 +8,6 @@
# [CXF-1510] Cannot handle anonymous bare requests
org/jboss/test/ws/jaxws/anonymous/**
-# [CXF-1511] WrappedMessageContext does not implement SOAPMessageContext
-org/jboss/test/ws/jaxws/binding/**
-
# [CXF-1516] Type inheritance with document/literal/bare
org/jboss/test/ws/jaxws/jbws1702/**
@@ -44,3 +41,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
+org/jboss/test/ws/jaxws/binding/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-09-22 11:01:42 UTC (rev 10743)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-09-22 14:23:29 UTC (rev 10744)
@@ -8,9 +8,6 @@
# [CXF-1510] Cannot handle anonymous bare requests
org/jboss/test/ws/jaxws/anonymous/**
-# [CXF-1511] WrappedMessageContext does not implement SOAPMessageContext
-org/jboss/test/ws/jaxws/binding/**
-
# [CXF-1516] Type inheritance with document/literal/bare
org/jboss/test/ws/jaxws/jbws1702/**
@@ -50,3 +47,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
+org/jboss/test/ws/jaxws/binding/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-09-22 11:01:42 UTC (rev 10743)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-09-22 14:23:29 UTC (rev 10744)
@@ -8,9 +8,6 @@
# [CXF-1510] Cannot handle anonymous bare requests
org/jboss/test/ws/jaxws/anonymous/**
-# [CXF-1511] WrappedMessageContext does not implement SOAPMessageContext
-org/jboss/test/ws/jaxws/binding/**
-
# [CXF-1516] Type inheritance with document/literal/bare
org/jboss/test/ws/jaxws/jbws1702/**
@@ -44,3 +41,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2770] Rewrite org.jboss.test.ws.jaxws.binding testcase
+org/jboss/test/ws/jaxws/binding/**
15 years, 5 months
JBossWS SVN: r10743 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws/benchmark/test and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-09-22 07:01:42 -0400 (Tue, 22 Sep 2009)
New Revision: 10743
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Address.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegister.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegisterResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Customer.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatistics.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatisticsResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/InvoiceCustomer.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Name.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ObjectFactory.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/PhoneNumber.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Register.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoice.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoiceResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterResponse.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Registration.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationFault.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationService.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Statistics.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/package-info.java
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
Adding another bench test
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-09-22 10:37:44 UTC (rev 10742)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-09-22 11:01:42 UTC (rev 10743)
@@ -36,6 +36,14 @@
</fileset>
</jar>
+ <!-- jaxws-benchmark-complex -->
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-benchmark-complex.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/benchmark/test/complex/types/*.class"/>
+ <include name="org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.class"/>
+ </fileset>
+ </jar>
+
<!-- jaxws-binding -->
<war warfile="${tests.output.dir}/test-libs/jaxws-binding.war" webxml="${tests.output.dir}/test-resources/jaxws/binding/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,271 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.benchmark.test.complex;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.test.ws.jaxws.benchmark.BenchmarkTest;
+import org.jboss.test.ws.jaxws.benchmark.Runner;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Address;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.InvoiceCustomer;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Name;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.PhoneNumber;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Registration;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Statistics;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault_Exception;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 21-Sep-2009
+ *
+ */
+public class ComplexTest implements BenchmarkTest
+{
+ private String endpointURL = "http://" + Runner.getServerAddress() + "/jaxws-benchmark-complex/RegistrationServiceImpl";
+ private String targetNS = "http://complex.test.benchmark.jaxws.ws.test.jboss.org";
+
+ public Object prepare() throws Exception
+ {
+ URL wsdlURL = new URL(endpointURL + "?wsdl");
+ QName serviceName = new QName(targetNS, "RegistrationServiceImplService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(Registration.class);
+ }
+
+ public void performIteration(Object port) throws Exception
+ {
+ testRegistration((Registration)port);
+ testInvoiceRegistration((Registration)port);
+ testOtherPackage((Registration)port);
+ testBulkRegistration((Registration)port);
+ }
+
+ public void testRegistration(Registration port) throws Exception
+ {
+ Customer customer = getFredJackson();
+ customer.getReferredCustomers().add(getJohnDoe());
+ customer.getReferredCustomers().add(getAlCapone());
+
+ XMLGregorianCalendar cal = getCalendar();
+
+ port.register(customer, cal);
+
+ customer = getAlCapone();
+ port.register(customer, cal);
+ }
+
+ public void testInvoiceRegistration(Registration port) throws Exception
+ {
+ InvoiceCustomer customer = getInvoiceFredJackson();
+ customer.getReferredCustomers().add(getJohnDoe());
+ customer.getReferredCustomers().add(getAlCapone());
+
+ port.registerForInvoice(customer);
+ }
+
+ public void testOtherPackage(Registration port) throws Exception
+ {
+ Statistics stats = port.getStatistics(getFredJackson());
+
+ stats.getActivationTime();
+ stats.getHits();
+ }
+
+ public void testBulkRegistration(Registration port) throws Exception
+ {
+ List<Customer> customers = new ArrayList<Customer>();
+ customers.add(getFredJackson());
+ customers.add(getJohnDoe());
+
+ List<Long> result = port.bulkRegister(customers, getCalendar());
+
+ customers.clear();
+ customers.add(getFredJackson());
+ customers.add(getInvalid(754));
+ customers.add(getInvalid(753));
+ customers.add(getJohnDoe());
+ customers.add(getInvalid(752));
+
+ try
+ {
+ port.bulkRegister(customers, getCalendar());
+ }
+ catch (ValidationFault_Exception e)
+ {
+ //OK
+ }
+ }
+
+ private Customer getFredJackson()
+ {
+ Name name = new Name();
+ name.setFirstName("Fred");
+ name.setMiddleName("Jones");
+ name.setLastName("Jackson");
+
+ Address address = new Address();
+ address.setCity("Atlanta");
+ address.setState("Georgia");
+ address.setZip("53717");
+ address.setStreet("Yet Another Peach Tree St.");
+
+ PhoneNumber number1 = new PhoneNumber();
+ number1.setAreaCode("123");
+ number1.setExchange("456");
+ number1.setLine("7890");
+
+ PhoneNumber number2 = new PhoneNumber();
+ number1.setAreaCode("333");
+ number1.setExchange("222");
+ number1.setLine("1234");
+
+ Customer customer = new Customer();
+ customer.setId(123);
+ customer.setName(name);
+ customer.setAddress(address);
+ customer.getContactNumbers().add(number1);
+ customer.getContactNumbers().add(number2);
+ return customer;
+ }
+
+ private InvoiceCustomer getInvoiceFredJackson()
+ {
+ Name name = new Name();
+ name.setFirstName("Fred");
+ name.setMiddleName("Jones");
+ name.setLastName("Jackson");
+
+ Address address = new Address();
+ address.setCity("Atlanta");
+ address.setState("Georgia");
+ address.setZip("53717");
+ address.setStreet("Yet Another Peach Tree St.");
+
+ PhoneNumber number1 = new PhoneNumber();
+ number1.setAreaCode("123");
+ number1.setExchange("456");
+ number1.setLine("7890");
+
+ PhoneNumber number2 = new PhoneNumber();
+ number1.setAreaCode("333");
+ number1.setExchange("222");
+ number1.setLine("1234");
+
+ InvoiceCustomer customer = new InvoiceCustomer();
+ customer.setId(123);
+ customer.setName(name);
+ customer.setAddress(address);
+ customer.getContactNumbers().add(number1);
+ customer.getContactNumbers().add(number2);
+ customer.setCycleDay(10);
+ return customer;
+ }
+
+ private Customer getJohnDoe()
+ {
+ Name name = new Name();
+ name.setFirstName("John");
+ name.setLastName("Doe");
+
+ Address address = new Address();
+ address.setCity("New York");
+ address.setState("New York");
+ address.setZip("10010");
+ address.setStreet("Park Street");
+
+ PhoneNumber number1 = new PhoneNumber();
+ number1.setAreaCode("555");
+ number1.setExchange("867");
+ number1.setLine("5309");
+
+ Customer customer = new Customer();
+ customer.setName(name);
+ customer.setAddress(address);
+ customer.getContactNumbers().add(number1);
+ customer.setId(124);
+ return customer;
+ }
+
+ private Customer getInvalid(long id)
+ {
+ Address address = new Address();
+ address.setCity("New York");
+ address.setState("New York");
+ address.setZip("10010");
+ address.setStreet("Park Street");
+
+ PhoneNumber number1 = new PhoneNumber();
+ number1.setAreaCode("555");
+ number1.setExchange("867");
+ number1.setLine("5309");
+
+ Customer customer = new Customer();
+ customer.setAddress(address);
+ customer.getContactNumbers().add(number1);
+ customer.setId(id);
+ return customer;
+ }
+
+ private Customer getAlCapone()
+ {
+ Name name = new Name();
+ name.setFirstName("Al");
+ name.setLastName("Capone");
+
+ Address address = new Address();
+ address.setCity("Chicago");
+ address.setState("Illinois");
+ address.setZip("60619");
+ address.setStreet("7244 South Prairie Avenue.");
+
+ PhoneNumber number1 = new PhoneNumber();
+ number1.setAreaCode("888");
+ number1.setExchange("722");
+ number1.setLine("7322");
+
+ Customer customer = new Customer();
+ customer.setName(name);
+ customer.setAddress(address);
+ customer.getContactNumbers().add(number1);
+ customer.setId(125);
+ return customer;
+ }
+
+ private XMLGregorianCalendar getCalendar() throws DatatypeConfigurationException
+ {
+ DatatypeFactory calFactory = DatatypeFactory.newInstance();
+ XMLGregorianCalendar cal = calFactory.newXMLGregorianCalendar(2002, 4, 5, 0, 0, 0, 0, 0);
+ return cal;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/ComplexTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.benchmark.test.complex;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.jboss.logging.Logger;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.AlreadyRegisteredFault_Exception;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Customer;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.InvoiceCustomer;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Name;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Registration;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.Statistics;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault;
+import org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault_Exception;
+
+/**
+ * A mock registration service that exercises the use of complex types, arrays, inheritence,
+ * and exceptions. Note that this test does not yet test polymorphic behavior.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @author Thomas.Diesler(a)jboss.com
+ * @author alessio.soldano(a)jboss.com
+ */
+@WebService(endpointInterface = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.Registration", targetNamespace = "http://complex.test.benchmark.jaxws.ws.test.jboss.org")
+@Stateless
+public class RegistrationServiceImpl implements Registration
+{
+ // Provide logging
+ private static Logger log = Logger.getLogger(RegistrationServiceImpl.class);
+
+ public long register(Customer customer, Object when) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ {
+ Name name = customer.getName();
+ if (name == null)
+ {
+ ValidationFault fault = new ValidationFault();
+ fault.getFailedCustomers().add(customer.getId());
+ throw new ValidationFault_Exception("No name!", fault);
+ }
+
+ for (Customer c : customer.getReferredCustomers())
+ {
+ log.trace("Refered customer: " + c.getName());
+ }
+
+ log.trace("registering customer: " + customer);
+ return customer.getId();
+ }
+
+ public List<Long> bulkRegister(List<Customer> customers, Object when) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ {
+ List<Long> registered = new ArrayList<Long>(customers.size());
+ List<Long> failed = new ArrayList<Long>(customers.size());
+
+ for (Customer c : customers)
+ {
+ try
+ {
+ registered.add(register(c, when));
+ }
+ catch (ValidationFault_Exception e)
+ {
+ failed.add(e.getFaultInfo().getFailedCustomers().get(0));
+ }
+ }
+
+ if (failed.size() > 0)
+ {
+ ValidationFault fault = new ValidationFault();
+ fault.getFailedCustomers().addAll(failed);
+ throw new ValidationFault_Exception("Validation errors on bulk registering customers", fault);
+ }
+
+ return registered;
+ }
+
+ public boolean registerForInvoice(InvoiceCustomer invoiceCustomer) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ {
+ log.trace("registerForInvoice: " + invoiceCustomer.getCycleDay());
+ return true;
+ }
+
+ public Statistics getStatistics(Customer customer)
+ {
+ Statistics stats = new Statistics();
+ stats.setHits(10);
+ stats.setActivationTime(getCalendar());
+ return stats;
+ }
+
+ private XMLGregorianCalendar getCalendar()
+ {
+ try
+ {
+ DatatypeFactory calFactory = DatatypeFactory.newInstance();
+ XMLGregorianCalendar cal = calFactory.newXMLGregorianCalendar(2002, 4, 5, 0, 0, 0, 0, 0);
+ return cal;
+ }
+ catch (DatatypeConfigurationException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/RegistrationServiceImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Address.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Address.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Address.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,146 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Address complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Address">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="city" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="state" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="street" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="zip" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Address", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "city",
+ "state",
+ "street",
+ "zip"
+})
+public class Address {
+
+ @XmlElement(required = true, nillable = true)
+ protected String city;
+ @XmlElement(required = true, nillable = true)
+ protected String state;
+ @XmlElement(required = true, nillable = true)
+ protected String street;
+ @XmlElement(required = true, nillable = true)
+ protected String zip;
+
+ /**
+ * Gets the value of the city property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCity() {
+ return city;
+ }
+
+ /**
+ * Sets the value of the city property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCity(String value) {
+ this.city = value;
+ }
+
+ /**
+ * Gets the value of the state property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * Sets the value of the state property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setState(String value) {
+ this.state = value;
+ }
+
+ /**
+ * Gets the value of the street property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getStreet() {
+ return street;
+ }
+
+ /**
+ * Sets the value of the street property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setStreet(String value) {
+ this.street = value;
+ }
+
+ /**
+ * Gets the value of the zip property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getZip() {
+ return zip;
+ }
+
+ /**
+ * Sets the value of the zip property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setZip(String value) {
+ this.zip = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Address.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for AlreadyRegisteredFault complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="AlreadyRegisteredFault">
+ * <complexContent>
+ * <extension base="{http://complex.jaxws.ws.test.jboss.org/}RegistrationFault">
+ * <sequence>
+ * <element name="existingId" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence>
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "AlreadyRegisteredFault", propOrder = {
+ "existingId"
+})
+public class AlreadyRegisteredFault
+ extends RegistrationFault
+{
+
+ protected long existingId;
+
+ /**
+ * Gets the value of the existingId property.
+ *
+ */
+ public long getExistingId() {
+ return existingId;
+ }
+
+ /**
+ * Sets the value of the existingId property.
+ *
+ */
+ public void setExistingId(long value) {
+ this.existingId = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.1
+ *
+ */
+@WebFault(name = "AlreadyRegisteredFault", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+public class AlreadyRegisteredFault_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private AlreadyRegisteredFault faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public AlreadyRegisteredFault_Exception(String message, AlreadyRegisteredFault faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public AlreadyRegisteredFault_Exception(String message, AlreadyRegisteredFault faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: org.jboss.test.ws.jaxws.benchmark.test.complex.types.AlreadyRegisteredFault
+ */
+ public AlreadyRegisteredFault getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/AlreadyRegisteredFault_Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegister.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegister.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegister.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,99 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for BulkRegister complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="BulkRegister">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Customers" type="{http://complex.jaxws.ws.test.jboss.org/}Customer" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="When" type="{http://www.w3.org/2001/XMLSchema}anySimpleType"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "BulkRegister", propOrder = {
+ "customers",
+ "when"
+})
+public class BulkRegister {
+
+ @XmlElement(name = "Customers", nillable = true)
+ protected List<Customer> customers;
+ @XmlElement(name = "When", required = true, nillable = true)
+ @XmlSchemaType(name = "anySimpleType")
+ protected Object when;
+
+ /**
+ * Gets the value of the customers property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the customers property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getCustomers().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Customer }
+ *
+ *
+ */
+ public List<Customer> getCustomers() {
+ if (customers == null) {
+ customers = new ArrayList<Customer>();
+ }
+ return this.customers;
+ }
+
+ /**
+ * Gets the value of the when property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getWhen() {
+ return when;
+ }
+
+ /**
+ * Sets the value of the when property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setWhen(Object value) {
+ this.when = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegister.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegisterResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegisterResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegisterResponse.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,69 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for BulkRegisterResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="BulkRegisterResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="RegisteredIDs" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "BulkRegisterResponse", propOrder = {
+ "registeredIDs"
+})
+public class BulkRegisterResponse {
+
+ @XmlElement(name = "RegisteredIDs", type = Long.class)
+ protected List<Long> registeredIDs;
+
+ /**
+ * Gets the value of the registeredIDs property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the registeredIDs property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRegisteredIDs().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Long }
+ *
+ *
+ */
+ public List<Long> getRegisteredIDs() {
+ if (registeredIDs == null) {
+ registeredIDs = new ArrayList<Long>();
+ }
+ return this.registeredIDs;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/BulkRegisterResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Customer.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Customer.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Customer.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,181 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Customer complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Customer">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="address" type="{http://complex.jaxws.ws.test.jboss.org/}Address"/>
+ * <element name="contactNumbers" type="{http://complex.jaxws.ws.test.jboss.org/}PhoneNumber" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * <element name="name" type="{http://complex.jaxws.ws.test.jboss.org/}Name"/>
+ * <element name="referredCustomers" type="{http://complex.jaxws.ws.test.jboss.org/}Customer" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Customer", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "address",
+ "contactNumbers",
+ "id",
+ "name",
+ "referredCustomers"
+})
+@XmlSeeAlso({
+ InvoiceCustomer.class
+})
+public class Customer {
+
+ @XmlElement(required = true, nillable = true)
+ protected Address address;
+ @XmlElement(nillable = true)
+ protected List<PhoneNumber> contactNumbers;
+ protected long id;
+ @XmlElement(required = true, nillable = true)
+ protected Name name;
+ @XmlElement(nillable = true)
+ protected List<Customer> referredCustomers;
+
+ /**
+ * Gets the value of the address property.
+ *
+ * @return
+ * possible object is
+ * {@link Address }
+ *
+ */
+ public Address getAddress() {
+ return address;
+ }
+
+ /**
+ * Sets the value of the address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Address }
+ *
+ */
+ public void setAddress(Address value) {
+ this.address = value;
+ }
+
+ /**
+ * Gets the value of the contactNumbers property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the contactNumbers property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getContactNumbers().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PhoneNumber }
+ *
+ *
+ */
+ public List<PhoneNumber> getContactNumbers() {
+ if (contactNumbers == null) {
+ contactNumbers = new ArrayList<PhoneNumber>();
+ }
+ return this.contactNumbers;
+ }
+
+ /**
+ * Gets the value of the id property.
+ *
+ */
+ public long getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ */
+ public void setId(long value) {
+ this.id = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link Name }
+ *
+ */
+ public Name getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Name }
+ *
+ */
+ public void setName(Name value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the referredCustomers property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the referredCustomers property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getReferredCustomers().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Customer }
+ *
+ *
+ */
+ public List<Customer> getReferredCustomers() {
+ if (referredCustomers == null) {
+ referredCustomers = new ArrayList<Customer>();
+ }
+ return this.referredCustomers;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Customer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatistics.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatistics.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatistics.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for GetStatistics complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="GetStatistics">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Customer" type="{http://complex.jaxws.ws.test.jboss.org/}Customer"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "GetStatistics", propOrder = {
+ "customer"
+})
+public class GetStatistics {
+
+ @XmlElement(name = "Customer", required = true, nillable = true)
+ protected Customer customer;
+
+ /**
+ * Gets the value of the customer property.
+ *
+ * @return
+ * possible object is
+ * {@link Customer }
+ *
+ */
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ /**
+ * Sets the value of the customer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Customer }
+ *
+ */
+ public void setCustomer(Customer value) {
+ this.customer = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatistics.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatisticsResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatisticsResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatisticsResponse.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for GetStatisticsResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="GetStatisticsResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Statistics" type="{http://extra.complex.jaxws.ws.test.jboss.org/}Statistics"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "GetStatisticsResponse", propOrder = {
+ "statistics"
+})
+public class GetStatisticsResponse {
+
+ @XmlElement(name = "Statistics", required = true, nillable = true)
+ protected Statistics statistics;
+
+ /**
+ * Gets the value of the statistics property.
+ *
+ * @return
+ * possible object is
+ * {@link Statistics }
+ *
+ */
+ public Statistics getStatistics() {
+ return statistics;
+ }
+
+ /**
+ * Sets the value of the statistics property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Statistics }
+ *
+ */
+ public void setStatistics(Statistics value) {
+ this.statistics = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/GetStatisticsResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/InvoiceCustomer.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/InvoiceCustomer.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/InvoiceCustomer.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for InvoiceCustomer complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="InvoiceCustomer">
+ * <complexContent>
+ * <extension base="{http://complex.jaxws.ws.test.jboss.org/}Customer">
+ * <sequence>
+ * <element name="cycleDay" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * </sequence>
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "InvoiceCustomer", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "cycleDay"
+})
+public class InvoiceCustomer
+ extends Customer
+{
+
+ protected int cycleDay;
+
+ /**
+ * Gets the value of the cycleDay property.
+ *
+ */
+ public int getCycleDay() {
+ return cycleDay;
+ }
+
+ /**
+ * Sets the value of the cycleDay property.
+ *
+ */
+ public void setCycleDay(int value) {
+ this.cycleDay = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/InvoiceCustomer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Name.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Name.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Name.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,118 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Name complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Name">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="middleName" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Name", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "firstName",
+ "lastName",
+ "middleName"
+})
+public class Name {
+
+ @XmlElement(required = true, nillable = true)
+ protected String firstName;
+ @XmlElement(required = true, nillable = true)
+ protected String lastName;
+ @XmlElement(required = true, nillable = true)
+ protected String middleName;
+
+ /**
+ * Gets the value of the firstName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFirstName() {
+ return firstName;
+ }
+
+ /**
+ * Sets the value of the firstName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFirstName(String value) {
+ this.firstName = value;
+ }
+
+ /**
+ * Gets the value of the lastName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLastName() {
+ return lastName;
+ }
+
+ /**
+ * Sets the value of the lastName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLastName(String value) {
+ this.lastName = value;
+ }
+
+ /**
+ * Gets the value of the middleName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMiddleName() {
+ return middleName;
+ }
+
+ /**
+ * Sets the value of the middleName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMiddleName(String value) {
+ this.middleName = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Name.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ObjectFactory.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ObjectFactory.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ObjectFactory.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,271 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.test.ws.jaxws.benchmark.test.complex.types package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _BulkRegister_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "BulkRegister");
+ private final static QName _GetStatistics_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "GetStatistics");
+ private final static QName _RegisterResponse_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "RegisterResponse");
+ private final static QName _RegisterForInvoiceResponse_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "RegisterForInvoiceResponse");
+ private final static QName _AlreadyRegisteredFault_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "AlreadyRegisteredFault");
+ private final static QName _GetStatisticsResponse_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "GetStatisticsResponse");
+ private final static QName _Register_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "Register");
+ private final static QName _RegisterForInvoice_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "RegisterForInvoice");
+ private final static QName _ValidationFault_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "ValidationFault");
+ private final static QName _BulkRegisterResponse_QNAME = new QName("http://types.complex.jaxws.ws.test.jboss.org/", "BulkRegisterResponse");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.test.ws.jaxws.benchmark.test.complex.types
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link GetStatisticsResponse }
+ *
+ */
+ public GetStatisticsResponse createGetStatisticsResponse() {
+ return new GetStatisticsResponse();
+ }
+
+ /**
+ * Create an instance of {@link GetStatistics }
+ *
+ */
+ public GetStatistics createGetStatistics() {
+ return new GetStatistics();
+ }
+
+ /**
+ * Create an instance of {@link Name }
+ *
+ */
+ public Name createName() {
+ return new Name();
+ }
+
+ /**
+ * Create an instance of {@link RegisterForInvoiceResponse }
+ *
+ */
+ public RegisterForInvoiceResponse createRegisterForInvoiceResponse() {
+ return new RegisterForInvoiceResponse();
+ }
+
+ /**
+ * Create an instance of {@link RegisterForInvoice }
+ *
+ */
+ public RegisterForInvoice createRegisterForInvoice() {
+ return new RegisterForInvoice();
+ }
+
+ /**
+ * Create an instance of {@link RegistrationFault }
+ *
+ */
+ public RegistrationFault createRegistrationFault() {
+ return new RegistrationFault();
+ }
+
+ /**
+ * Create an instance of {@link Register }
+ *
+ */
+ public Register createRegister() {
+ return new Register();
+ }
+
+ /**
+ * Create an instance of {@link InvoiceCustomer }
+ *
+ */
+ public InvoiceCustomer createInvoiceCustomer() {
+ return new InvoiceCustomer();
+ }
+
+ /**
+ * Create an instance of {@link BulkRegisterResponse }
+ *
+ */
+ public BulkRegisterResponse createBulkRegisterResponse() {
+ return new BulkRegisterResponse();
+ }
+
+ /**
+ * Create an instance of {@link ValidationFault }
+ *
+ */
+ public ValidationFault createValidationFault() {
+ return new ValidationFault();
+ }
+
+ /**
+ * Create an instance of {@link Statistics }
+ *
+ */
+ public Statistics createStatistics() {
+ return new Statistics();
+ }
+
+ /**
+ * Create an instance of {@link BulkRegister }
+ *
+ */
+ public BulkRegister createBulkRegister() {
+ return new BulkRegister();
+ }
+
+ /**
+ * Create an instance of {@link Address }
+ *
+ */
+ public Address createAddress() {
+ return new Address();
+ }
+
+ /**
+ * Create an instance of {@link PhoneNumber }
+ *
+ */
+ public PhoneNumber createPhoneNumber() {
+ return new PhoneNumber();
+ }
+
+ /**
+ * Create an instance of {@link AlreadyRegisteredFault }
+ *
+ */
+ public AlreadyRegisteredFault createAlreadyRegisteredFault() {
+ return new AlreadyRegisteredFault();
+ }
+
+ /**
+ * Create an instance of {@link Customer }
+ *
+ */
+ public Customer createCustomer() {
+ return new Customer();
+ }
+
+ /**
+ * Create an instance of {@link RegisterResponse }
+ *
+ */
+ public RegisterResponse createRegisterResponse() {
+ return new RegisterResponse();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link BulkRegister }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "BulkRegister")
+ public JAXBElement<BulkRegister> createBulkRegister(BulkRegister value) {
+ return new JAXBElement<BulkRegister>(_BulkRegister_QNAME, BulkRegister.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link GetStatistics }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "GetStatistics")
+ public JAXBElement<GetStatistics> createGetStatistics(GetStatistics value) {
+ return new JAXBElement<GetStatistics>(_GetStatistics_QNAME, GetStatistics.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RegisterResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "RegisterResponse")
+ public JAXBElement<RegisterResponse> createRegisterResponse(RegisterResponse value) {
+ return new JAXBElement<RegisterResponse>(_RegisterResponse_QNAME, RegisterResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RegisterForInvoiceResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "RegisterForInvoiceResponse")
+ public JAXBElement<RegisterForInvoiceResponse> createRegisterForInvoiceResponse(RegisterForInvoiceResponse value) {
+ return new JAXBElement<RegisterForInvoiceResponse>(_RegisterForInvoiceResponse_QNAME, RegisterForInvoiceResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AlreadyRegisteredFault }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "AlreadyRegisteredFault")
+ public JAXBElement<AlreadyRegisteredFault> createAlreadyRegisteredFault(AlreadyRegisteredFault value) {
+ return new JAXBElement<AlreadyRegisteredFault>(_AlreadyRegisteredFault_QNAME, AlreadyRegisteredFault.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link GetStatisticsResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "GetStatisticsResponse")
+ public JAXBElement<GetStatisticsResponse> createGetStatisticsResponse(GetStatisticsResponse value) {
+ return new JAXBElement<GetStatisticsResponse>(_GetStatisticsResponse_QNAME, GetStatisticsResponse.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link Register }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "Register")
+ public JAXBElement<Register> createRegister(Register value) {
+ return new JAXBElement<Register>(_Register_QNAME, Register.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RegisterForInvoice }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "RegisterForInvoice")
+ public JAXBElement<RegisterForInvoice> createRegisterForInvoice(RegisterForInvoice value) {
+ return new JAXBElement<RegisterForInvoice>(_RegisterForInvoice_QNAME, RegisterForInvoice.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link ValidationFault }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "ValidationFault")
+ public JAXBElement<ValidationFault> createValidationFault(ValidationFault value) {
+ return new JAXBElement<ValidationFault>(_ValidationFault_QNAME, ValidationFault.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link BulkRegisterResponse }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", name = "BulkRegisterResponse")
+ public JAXBElement<BulkRegisterResponse> createBulkRegisterResponse(BulkRegisterResponse value) {
+ return new JAXBElement<BulkRegisterResponse>(_BulkRegisterResponse_QNAME, BulkRegisterResponse.class, null, value);
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/PhoneNumber.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/PhoneNumber.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/PhoneNumber.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,118 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for PhoneNumber complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="PhoneNumber">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="areaCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="exchange" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * <element name="line" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "PhoneNumber", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "areaCode",
+ "exchange",
+ "line"
+})
+public class PhoneNumber {
+
+ @XmlElement(required = true, nillable = true)
+ protected String areaCode;
+ @XmlElement(required = true, nillable = true)
+ protected String exchange;
+ @XmlElement(required = true, nillable = true)
+ protected String line;
+
+ /**
+ * Gets the value of the areaCode property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAreaCode() {
+ return areaCode;
+ }
+
+ /**
+ * Sets the value of the areaCode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAreaCode(String value) {
+ this.areaCode = value;
+ }
+
+ /**
+ * Gets the value of the exchange property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getExchange() {
+ return exchange;
+ }
+
+ /**
+ * Sets the value of the exchange property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExchange(String value) {
+ this.exchange = value;
+ }
+
+ /**
+ * Gets the value of the line property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLine() {
+ return line;
+ }
+
+ /**
+ * Sets the value of the line property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLine(String value) {
+ this.line = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/PhoneNumber.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Register.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Register.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Register.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,92 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Register complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Register">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="Customer" type="{http://complex.jaxws.ws.test.jboss.org/}Customer"/>
+ * <element name="When" type="{http://www.w3.org/2001/XMLSchema}anySimpleType"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Register", propOrder = {
+ "customer",
+ "when"
+})
+public class Register {
+
+ @XmlElement(name = "Customer", required = true, nillable = true)
+ protected Customer customer;
+ @XmlElement(name = "When", required = true, nillable = true)
+ @XmlSchemaType(name = "anySimpleType")
+ protected Object when;
+
+ /**
+ * Gets the value of the customer property.
+ *
+ * @return
+ * possible object is
+ * {@link Customer }
+ *
+ */
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ /**
+ * Sets the value of the customer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Customer }
+ *
+ */
+ public void setCustomer(Customer value) {
+ this.customer = value;
+ }
+
+ /**
+ * Gets the value of the when property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getWhen() {
+ return when;
+ }
+
+ /**
+ * Sets the value of the when property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setWhen(Object value) {
+ this.when = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Register.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoice.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoice.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoice.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,62 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for RegisterForInvoice complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="RegisterForInvoice">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="InvoiceCustomer" type="{http://complex.jaxws.ws.test.jboss.org/}InvoiceCustomer"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RegisterForInvoice", propOrder = {
+ "invoiceCustomer"
+})
+public class RegisterForInvoice {
+
+ @XmlElement(name = "InvoiceCustomer", required = true, nillable = true)
+ protected InvoiceCustomer invoiceCustomer;
+
+ /**
+ * Gets the value of the invoiceCustomer property.
+ *
+ * @return
+ * possible object is
+ * {@link InvoiceCustomer }
+ *
+ */
+ public InvoiceCustomer getInvoiceCustomer() {
+ return invoiceCustomer;
+ }
+
+ /**
+ * Sets the value of the invoiceCustomer property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InvoiceCustomer }
+ *
+ */
+ public void setInvoiceCustomer(InvoiceCustomer value) {
+ this.invoiceCustomer = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoice.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoiceResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoiceResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoiceResponse.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,52 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for RegisterForInvoiceResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="RegisterForInvoiceResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="done" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RegisterForInvoiceResponse", propOrder = {
+ "done"
+})
+public class RegisterForInvoiceResponse {
+
+ protected boolean done;
+
+ /**
+ * Gets the value of the done property.
+ *
+ */
+ public boolean isDone() {
+ return done;
+ }
+
+ /**
+ * Sets the value of the done property.
+ *
+ */
+ public void setDone(boolean value) {
+ this.done = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterForInvoiceResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterResponse.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterResponse.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterResponse.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for RegisterResponse complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="RegisterResponse">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="RegisteredID" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RegisterResponse", propOrder = {
+ "registeredID"
+})
+public class RegisterResponse {
+
+ @XmlElement(name = "RegisteredID")
+ protected long registeredID;
+
+ /**
+ * Gets the value of the registeredID property.
+ *
+ */
+ public long getRegisteredID() {
+ return registeredID;
+ }
+
+ /**
+ * Sets the value of the registeredID property.
+ *
+ */
+ public void setRegisteredID(long value) {
+ this.registeredID = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegisterResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Registration.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Registration.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Registration.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,101 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.util.List;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.1
+ *
+ */
+@WebService(name = "Registration", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+@XmlSeeAlso({
+ ObjectFactory.class
+})
+public interface Registration {
+
+
+ /**
+ *
+ * @param when
+ * @param customers
+ * @return
+ * returns java.util.List<java.lang.Long>
+ * @throws AlreadyRegisteredFault_Exception
+ * @throws ValidationFault_Exception
+ */
+ @WebMethod(operationName = "BulkRegister")
+ @WebResult(name = "RegisteredIDs", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ @RequestWrapper(localName = "BulkRegister", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.BulkRegister")
+ @ResponseWrapper(localName = "BulkRegisterResponse", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.BulkRegisterResponse")
+ public List<Long> bulkRegister(
+ @WebParam(name = "Customers", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ List<Customer> customers,
+ @WebParam(name = "When", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ Object when)
+ throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ ;
+
+ /**
+ *
+ * @param customer
+ * @return
+ * returns org.jboss.test.ws.jaxws.benchmark.test.complex.types.Statistics
+ */
+ @WebMethod(operationName = "GetStatistics")
+ @WebResult(name = "Statistics", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ @RequestWrapper(localName = "GetStatistics", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.GetStatistics")
+ @ResponseWrapper(localName = "GetStatisticsResponse", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.GetStatisticsResponse")
+ public Statistics getStatistics(
+ @WebParam(name = "Customer", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ Customer customer);
+
+ /**
+ *
+ * @param when
+ * @param customer
+ * @return
+ * returns long
+ * @throws AlreadyRegisteredFault_Exception
+ * @throws ValidationFault_Exception
+ */
+ @WebMethod(operationName = "Register")
+ @WebResult(name = "RegisteredID", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ @RequestWrapper(localName = "Register", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.Register")
+ @ResponseWrapper(localName = "RegisterResponse", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.RegisterResponse")
+ public long register(
+ @WebParam(name = "Customer", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ Customer customer,
+ @WebParam(name = "When", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ Object when)
+ throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ ;
+
+ /**
+ *
+ * @param invoiceCustomer
+ * @return
+ * returns boolean
+ * @throws AlreadyRegisteredFault_Exception
+ * @throws ValidationFault_Exception
+ */
+ @WebMethod(operationName = "RegisterForInvoice")
+ @WebResult(name = "done", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ @RequestWrapper(localName = "RegisterForInvoice", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.RegisterForInvoice")
+ @ResponseWrapper(localName = "RegisterForInvoiceResponse", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/", className = "org.jboss.test.ws.jaxws.benchmark.test.complex.types.RegisterForInvoiceResponse")
+ public boolean registerForInvoice(
+ @WebParam(name = "InvoiceCustomer", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+ InvoiceCustomer invoiceCustomer)
+ throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+ ;
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Registration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationFault.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationFault.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationFault.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,67 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for RegistrationFault complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="RegistrationFault">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="message" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "RegistrationFault", namespace = "http://complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "message"
+})
+@XmlSeeAlso({
+ AlreadyRegisteredFault.class,
+ ValidationFault.class
+})
+public class RegistrationFault {
+
+ @XmlElement(required = true, nillable = true)
+ protected String message;
+
+ /**
+ * Gets the value of the message property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the value of the message property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationFault.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationService.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationService.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationService.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,71 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.1
+ *
+ */
+@WebServiceClient(name = "RegistrationService", targetNamespace = "http://complex.jaxws.ws.test.jboss.org/", wsdlLocation = "file:/home/alessio/tmp-bench/RegistrationService.wsdl")
+public class RegistrationService
+ extends Service
+{
+
+ private final static URL REGISTRATIONSERVICE_WSDL_LOCATION;
+ private final static Logger logger = Logger.getLogger(org.jboss.test.ws.jaxws.benchmark.test.complex.types.RegistrationService.class.getName());
+
+ static {
+ URL url = null;
+ try {
+ URL baseUrl;
+ baseUrl = org.jboss.test.ws.jaxws.benchmark.test.complex.types.RegistrationService.class.getResource(".");
+ url = new URL(baseUrl, "file:/home/alessio/tmp-bench/RegistrationService.wsdl");
+ } catch (MalformedURLException e) {
+ logger.warning("Failed to create URL for the wsdl Location: 'file:/home/alessio/tmp-bench/RegistrationService.wsdl', retrying as a local file");
+ logger.warning(e.getMessage());
+ }
+ REGISTRATIONSERVICE_WSDL_LOCATION = url;
+ }
+
+ public RegistrationService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public RegistrationService() {
+ super(REGISTRATIONSERVICE_WSDL_LOCATION, new QName("http://complex.jaxws.ws.test.jboss.org/", "RegistrationService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns Registration
+ */
+ @WebEndpoint(name = "RegistrationPort")
+ public Registration getRegistrationPort() {
+ return super.getPort(new QName("http://complex.jaxws.ws.test.jboss.org/", "RegistrationPort"), Registration.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
+ * @return
+ * returns Registration
+ */
+ @WebEndpoint(name = "RegistrationPort")
+ public Registration getRegistrationPort(WebServiceFeature... features) {
+ return super.getPort(new QName("http://complex.jaxws.ws.test.jboss.org/", "RegistrationPort"), Registration.class, features);
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/RegistrationService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Statistics.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Statistics.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Statistics.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,83 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Statistics complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Statistics">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="activationTime" type="{http://www.w3.org/2001/XMLSchema}anySimpleType"/>
+ * <element name="hits" type="{http://www.w3.org/2001/XMLSchema}long"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "Statistics", namespace = "http://extra.complex.jaxws.ws.test.jboss.org/", propOrder = {
+ "activationTime",
+ "hits"
+})
+public class Statistics {
+
+ @XmlElement(required = true, nillable = true)
+ @XmlSchemaType(name = "anySimpleType")
+ protected Object activationTime;
+ protected long hits;
+
+ /**
+ * Gets the value of the activationTime property.
+ *
+ * @return
+ * possible object is
+ * {@link Object }
+ *
+ */
+ public Object getActivationTime() {
+ return activationTime;
+ }
+
+ /**
+ * Sets the value of the activationTime property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Object }
+ *
+ */
+ public void setActivationTime(Object value) {
+ this.activationTime = value;
+ }
+
+ /**
+ * Gets the value of the hits property.
+ *
+ */
+ public long getHits() {
+ return hits;
+ }
+
+ /**
+ * Sets the value of the hits property.
+ *
+ */
+ public void setHits(long value) {
+ this.hits = value;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/Statistics.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,71 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ValidationFault complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="ValidationFault">
+ * <complexContent>
+ * <extension base="{http://complex.jaxws.ws.test.jboss.org/}RegistrationFault">
+ * <sequence>
+ * <element name="failedCustomers" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+(a)XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "ValidationFault", propOrder = {
+ "failedCustomers"
+})
+public class ValidationFault
+ extends RegistrationFault
+{
+
+ @XmlElement(type = Long.class)
+ protected List<Long> failedCustomers;
+
+ /**
+ * Gets the value of the failedCustomers property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the failedCustomers property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getFailedCustomers().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Long }
+ *
+ *
+ */
+ public List<Long> getFailedCustomers() {
+ if (failedCustomers == null) {
+ failedCustomers = new ArrayList<Long>();
+ }
+ return this.failedCustomers;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,54 @@
+
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
+
+import javax.xml.ws.WebFault;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.3-b02-
+ * Generated source version: 2.1
+ *
+ */
+@WebFault(name = "ValidationFault", targetNamespace = "http://types.complex.jaxws.ws.test.jboss.org/")
+public class ValidationFault_Exception
+ extends Exception
+{
+
+ /**
+ * Java type that goes as soapenv:Fault detail element.
+ *
+ */
+ private ValidationFault faultInfo;
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ */
+ public ValidationFault_Exception(String message, ValidationFault faultInfo) {
+ super(message);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @param faultInfo
+ * @param message
+ * @param cause
+ */
+ public ValidationFault_Exception(String message, ValidationFault faultInfo, Throwable cause) {
+ super(message, cause);
+ this.faultInfo = faultInfo;
+ }
+
+ /**
+ *
+ * @return
+ * returns fault bean: org.jboss.test.ws.jaxws.benchmark.test.complex.types.ValidationFault
+ */
+ public ValidationFault getFaultInfo() {
+ return faultInfo;
+ }
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/ValidationFault_Exception.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/package-info.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/package-info.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/package-info.java 2009-09-22 11:01:42 UTC (rev 10743)
@@ -0,0 +1,2 @@
+(a)javax.xml.bind.annotation.XmlSchema(namespace = "http://types.complex.jaxws.ws.test.jboss.org/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.test.ws.jaxws.benchmark.test.complex.types;
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/benchmark/test/complex/types/package-info.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 5 months
JBossWS SVN: r10742 - stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/samples/wsaddr/replyto.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-22 06:37:44 -0400 (Tue, 22 Sep 2009)
New Revision: 10742
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/samples/wsaddr/replyto/ClientHandler.java
Log:
[JBPAPP-1704] AddressingReplyToTestCase failure.
Remove hardcoded reference to localhost and use 'jboss.bind.address' to discover
the JBoss address.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/samples/wsaddr/replyto/ClientHandler.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/samples/wsaddr/replyto/ClientHandler.java 2009-09-22 09:36:05 UTC (rev 10741)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/samples/wsaddr/replyto/ClientHandler.java 2009-09-22 10:37:44 UTC (rev 10742)
@@ -34,9 +34,6 @@
import javax.xml.ws.addressing.soap.SOAPAddressingBuilder;
import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
-import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
-
-
import org.jboss.logging.Logger;
/**
@@ -59,9 +56,10 @@
{
AddressingBuilder builder = SOAPAddressingBuilder.getAddressingBuilder();
SOAPAddressingProperties outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
- outProps.setTo(builder.newURI("http://localhost:8080/jaxrpc-samples-wsaddr-hello"));
+ String hostname = System.getProperty("jboss.bind.address", "localhost");
+ outProps.setTo(builder.newURI("http://" + hostname + ":8080/jaxrpc-samples-wsaddr-hello"));
outProps.setAction(builder.newURI("http://org.jboss.ws/jaxrpc/samples/wsaddr/replyto/sayHello"));
- EndpointReference rp = builder.newEndpointReference(new URI("http://localhost:8080/jaxrpc-samples-wsaddr-replyto"));
+ EndpointReference rp = builder.newEndpointReference(new URI("http://" + hostname + ":8080/jaxrpc-samples-wsaddr-replyto"));
outProps.setReplyTo(rp);
outProps.setMessageID(builder.newURI("123456"));
context.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
15 years, 5 months
JBossWS SVN: r10741 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-09-22 05:36:05 -0400 (Tue, 22 Sep 2009)
New Revision: 10741
Modified:
stack/cxf/trunk/pom.xml
Log:
Typo
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-09-22 09:20:20 UTC (rev 10740)
+++ stack/cxf/trunk/pom.xml 2009-09-22 09:36:05 UTC (rev 10741)
@@ -45,7 +45,7 @@
<properties>
<jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.2.1-SNAPSHOT</jbossws.framework.version>
- <jbossws.spi.version>1.2.1-SNAPSOT</jbossws.spi.version>
+ <jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
<jbossws.jboss500.version>3.2.0.GA</jbossws.jboss500.version>
<jbossws.jboss501.version>3.2.0.GA</jbossws.jboss501.version>
<jbossws.jboss510.version>3.2.0.GA</jbossws.jboss510.version>
15 years, 5 months
JBossWS SVN: r10740 - stack/metro/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-09-22 05:20:20 -0400 (Tue, 22 Sep 2009)
New Revision: 10740
Modified:
stack/metro/trunk/pom.xml
Log:
Moving to snapshots
Modified: stack/metro/trunk/pom.xml
===================================================================
--- stack/metro/trunk/pom.xml 2009-09-22 09:18:44 UTC (rev 10739)
+++ stack/metro/trunk/pom.xml 2009-09-22 09:20:20 UTC (rev 10740)
@@ -44,9 +44,9 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.2.0.GA</jbossws.common.version>
+ <jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.2.1-SNAPSHOT</jbossws.framework.version>
- <jbossws.spi.version>1.2.0.GA</jbossws.spi.version>
+ <jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
<jbossws.jboss500.version>3.2.0.GA</jbossws.jboss500.version>
<jbossws.jboss501.version>3.2.0.GA</jbossws.jboss501.version>
<jbossws.jboss510.version>3.2.0.GA</jbossws.jboss510.version>
15 years, 5 months