Author: thomas.diesler(a)jboss.com
Date: 2007-04-23 02:06:16 -0400 (Mon, 23 Apr 2007)
New Revision: 2896
Added:
trunk/integration/build.xml
trunk/integration/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
trunk/integration/src/main/java/org/jboss/ws/integration/BasicService.java
trunk/integration/src/main/java/org/jboss/ws/integration/KernelLocator.java
trunk/integration/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
trunk/integration/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
trunk/integration/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
trunk/integration/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManagerFactory.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/EndpointNameDeployer.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/RegisteringDeployer.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/ValidatingDeployer.java
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicEndpointImp.java
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/InvalidEndpointImp.java
Modified:
trunk/integration/.classpath
trunk/integration/src/main/java/org/jboss/ws/integration/Service.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentManager.java
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManager.java
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicDeploymentTest.java
trunk/integration/src/test/resources/basic/basic-deployers.xml
Log:
More work on general integration
Modified: trunk/integration/.classpath
===================================================================
--- trunk/integration/.classpath 2007-04-20 23:49:59 UTC (rev 2895)
+++ trunk/integration/.classpath 2007-04-23 06:06:16 UTC (rev 2896)
@@ -14,5 +14,6 @@
<classpathentry kind="lib"
path="/build/thirdparty/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/xalan.jar"
sourcepath="/usr/java/xalan-j_2_7_0/src"/>
<classpathentry kind="lib"
path="/build/thirdparty/xercesImpl.jar"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/jbossws-api"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Added: trunk/integration/build.xml
===================================================================
--- trunk/integration/build.xml (rev 0)
+++ trunk/integration/build.xml 2007-04-23 06:06:16 UTC (rev 2896)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="main" basedir="../integration"
name="WebService Integration">
+
+ <import file="${basedir}/../build/ant-import/build-thirdparty.xml"/>
+ <import file="${basedir}/../build/ant-import/build-setup.xml"/>
+ <import file="${basedir}/../jbossws-api/build.xml"/>
+
+ <property name="integration.src.dir"
value="${integration.dir}/src"/>
+ <property name="integration.java.dir"
value="${integration.src.dir}/main/java"/>
+ <property name="integration.resources.dir"
value="${integration.src.dir}/main/resources"/>
+ <property name="integration.output.dir"
value="${integration.dir}/output"/>
+ <property name="integration.output.apidocs.dir"
value="${integration.output.dir}/apidocs"/>
+ <property name="integration.output.classes.dir"
value="${integration.output.dir}/classes"/>
+ <property name="integration.output.lib.dir"
value="${integration.output.dir}/lib"/>
+
+ <target name="integration-init" depends="prepare,
thirdparty">
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Compile -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Compile everything.
+ |
+ | This target should depend on other compile-* targets for each
+ | different type of compile that needs to be performed, short of
+ | documentation compiles.
+ -->
+
+ <target name="integration-compile"
depends="integration-init,integration-compile-classes,integration-compile-etc"
+ description="Compile all source files."/>
+
+ <!-- Compile java sources -->
+ <target name="integration-compile-classes"
depends="integration-init,api-compile-classes">
+
+ <!-- Compile integration classes with jdk1.5 -->
+ <mkdir dir="${integration.output.classes.dir}"/>
+ <javac srcdir="${integration.java.dir}" sourcepath=""
destdir="${integration.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}" source="1.5"
target="1.5">
+ <include name="org/jboss/ws/integration/**"/>
+ <classpath refid="core.classpath"/>
+ <classpath path="${api.output.classes.dir}"/>
+ </javac>
+ </target>
+
+ <!-- Compile etc files (manifests and such) -->
+ <target name="integration-compile-etc"
depends="integration-init,api-compile-etc">
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Archives -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="integration-jars"
depends="integration-compile,integration-module-jars" description="Builds
all jar files.">
+ </target>
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="integration-module-jars">
+
+ <!-- Build jbossws-integration.jar -->
+ <mkdir dir="${integration.output.lib.dir}"/>
+ <jar jarfile="${integration.output.lib.dir}/jbossws-integration.jar"
manifest="${build.etc.dir}/default.mf">
+ <fileset dir="${integration.output.classes.dir}">
+ <include name="org/jboss/ws/integration/**"/>
+ </fileset>
+ </jar>
+
+ <!-- Build jbossws-integration-src.zip -->
+ <zip zipfile="${integration.output.lib.dir}/jbossws-integration-src.zip"
>
+ <fileset dir="${integration.java.dir}"/>
+ </zip>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Documentation -->
+ <!-- ================================================================== -->
+
+ <!-- Generate the JavaDoc -->
+ <target name="integration-javadoc" depends="integration-init"
description="Generate the Javadoc">
+
+ <mkdir dir="${integration.output.apidocs.dir}"/>
+ <javadoc destdir="${integration.output.apidocs.dir}"
author="true" version="true" use="true"
windowtitle="JBossWS API">
+ <classpath refid="integration.classpath"/>
+ <packageset dir="${integration.java.dir}"
defaultexcludes="yes">
+ <include name="org/jboss/ws/**"/>
+ </packageset>
+ <doctitle><![CDATA[<h1>JBossWS</h1>]]></doctitle>
+ <tag name="todo" scope="all" description="To
do:"/>
+ <group title="Core"
packages="org.jboss.ws.integration*"/>
+ <group title="Metadata"
packages="org.jboss.ws.metadata*"/>
+ <group title="Integration"
packages="org.jboss.ws.integration*"/>
+ <group title="Extensions"
packages="org.jboss.ws.extensions*"/>
+ <group title="Tools" packages="org.jboss.ws.tools*"/>
+ </javadoc>
+ </target>
+
+ <target name="clean" depends="prepare" description="Cleans
up most generated files.">
+ <delete dir="${integration.output.dir}"/>
+ </target>
+
+ <target name="main" description="Executes the default target
(most)." depends="most"/>
+
+ <target name="most" description="Builds almost everything."
depends="integration-jars"/>
+
+ <target name="all" description="Create a distribution zip file"
depends="main">
+ </target>
+
+</project>
Property changes on: trunk/integration/build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
(rev 0)
+++ trunk/integration/src/main/java/org/jboss/ws/integration/BasicEndpoint.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,143 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+import java.util.List;
+
+import javax.management.ObjectName;
+import javax.xml.transform.Source;
+
+/**
+ * A general JAXWS endpoint.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpoint implements Endpoint
+{
+ private Service service;
+ private ObjectName name;
+ private Class endpointImpl;
+ private List<Source> metaData;
+ private RequestHandler requestHandler;
+ private LifecycleHandler lifecycleHandler;
+
+ public BasicEndpoint(Service service, Class impl)
+ {
+ this.service = service;
+ this.endpointImpl = impl;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ this.service = service;
+ }
+
+ public Class getEndpointImpl()
+ {
+ return endpointImpl;
+ }
+
+ public void setEndpointImpl(Class endpointImpl)
+ {
+ this.endpointImpl = endpointImpl;
+ }
+
+ public LifecycleHandler getLifecycleHandler()
+ {
+ return lifecycleHandler;
+ }
+
+ public void setLifecycleHandler(LifecycleHandler lifecycleHandler)
+ {
+ this.lifecycleHandler = lifecycleHandler;
+ }
+
+ public List<Source> getMetaData()
+ {
+ return metaData;
+ }
+
+ public void addMetaData(Source metaData)
+ {
+ this.metaData.add(metaData);
+ }
+
+ public ObjectName getName()
+ {
+ return name;
+ }
+
+ public void setName(ObjectName name)
+ {
+ this.name = name;
+ }
+
+ public RequestHandler getRequestHandler()
+ {
+ return requestHandler;
+ }
+
+ public void setRequestHandler(RequestHandler requestHandler)
+ {
+ this.requestHandler = requestHandler;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/BasicService.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/BasicService.java
(rev 0)
+++ trunk/integration/src/main/java/org/jboss/ws/integration/BasicService.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,104 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.ws.integration.deployment.DeploymentUnit;
+
+/**
+ * A general service.
+ *
+ * Maintains a named set of Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicService implements Service
+{
+ private DeploymentUnit unit;
+ private List<Endpoint> endpoints = new LinkedList<Endpoint>();
+
+ public BasicService(DeploymentUnit unit)
+ {
+ this.unit = unit;
+ this.unit.setService(this);
+ }
+
+ public DeploymentUnit getDeploymentUnit()
+ {
+ return unit;
+ }
+
+ public void setDeploymentUnit(DeploymentUnit unit)
+ {
+ this.unit = unit;
+ }
+
+ public void addEndpoint(Endpoint endpoint)
+ {
+ endpoints.add(endpoint);
+ }
+
+ public List<Endpoint> getEndpoints()
+ {
+ return endpoints;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/BasicService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/KernelLocator.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/KernelLocator.java
(rev 0)
+++ trunk/integration/src/main/java/org/jboss/ws/integration/KernelLocator.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator
+{
+ private static Kernel kernel;
+
+ public static Kernel getKernel()
+ {
+ return KernelLocator.kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ KernelLocator.kernel = kernel;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/KernelLocator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+import java.util.Hashtable;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * A simple factory for creating safe object names.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-May-2006
+ */
+public class ObjectNameFactory
+{
+ public static ObjectName create(String name)
+ {
+ try
+ {
+ return new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + name + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, String key, String value)
+ {
+ try
+ {
+ return new ObjectName(domain, key, value);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," + key
+ "," + value + "; " + e);
+ }
+ }
+
+ public static ObjectName create(String domain, Hashtable table)
+ {
+ try
+ {
+ return new ObjectName(domain, table);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new Error("Invalid ObjectName: " + domain + "," +
table + "; " + e);
+ }
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/ObjectNameFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+/**
+ * The default file adapter loads resources through an associated classloader.
+ * If no classload is set, the the thread context classloader will be used.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @since 25.01.2007
+ */
+public class ResourceLoaderAdapter implements UnifiedVirtualFile
+{
+ private URL resourceURL;
+ private ClassLoader loader;
+
+ public ResourceLoaderAdapter()
+ {
+ this(Thread.currentThread().getContextClassLoader());
+ }
+
+ public ResourceLoaderAdapter(ClassLoader loader)
+ {
+ this.loader = loader;
+ }
+
+ private ResourceLoaderAdapter(ClassLoader loader, URL resourceURL)
+ {
+ this.resourceURL = resourceURL;
+ this.loader = loader;
+ }
+
+ public UnifiedVirtualFile findChild(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null)
+ {
+ // Try the child as URL
+ try
+ {
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (resourceURL == null)
+ {
+ try
+ {
+ File file = new File(resourcePath);
+ if (file.exists())
+ resourceURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (resourceURL == null)
+ {
+ try
+ {
+ resourceURL = loader.getResource(resourcePath);
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ if (resourceURL == null)
+ throw new IOException("Cannot get URL for: " + resourcePath);
+
+ return new ResourceLoaderAdapter(loader, resourceURL);
+ }
+
+ public URL toURL()
+ {
+ if (null == this.resourceURL)
+ throw new IllegalStateException("UnifiedVirtualFile not
initialized");
+ return resourceURL;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/src/main/java/org/jboss/ws/integration/Service.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/Service.java 2007-04-20
23:49:59 UTC (rev 2895)
+++ trunk/integration/src/main/java/org/jboss/ws/integration/Service.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -57,7 +57,7 @@
// $Id$
-import java.util.Set;
+import java.util.List;
import org.jboss.ws.integration.deployment.DeploymentUnit;
@@ -80,5 +80,6 @@
/** Add an endpoint to the service */
void addEndpoint(Endpoint endpoint);
- Set<Endpoint> getEndpoints();
+ /** Get the list of endpoints */
+ List<Endpoint> getEndpoints();
}
Added: trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefElement.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.Serializable;
+
+/**
+ * A marker for all <service-ref> related objects.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-Mar-2007
+ */
+public abstract class ServiceRefElement implements Serializable
+{
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefElement.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
+/**
+ * An implementation of this interface handles all service-ref binding concerns
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2004
+ */
+public interface ServiceRefHandler
+{
+ String BEAN_NAME = "ServiceRefHandler";
+
+ ServiceRefMetaData newServiceRefMetaData();
+
+ Object newChild(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs);
+
+ void setValue(ServiceRefElement ref, UnmarshallingContext navigator, String
namespaceURI, String localName, String value);
+
+ void bindServiceRef(Context encCtx, String encName, UnifiedVirtualFile vfsRoot,
ClassLoader loader, ServiceRefMetaData sref) throws NamingException;
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.Serializable;
+
+import org.w3c.dom.Element;
+
+/**
+ * An abstract service-ref meta data object.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 08-Mar-2007
+ */
+public abstract class ServiceRefMetaData extends ServiceRefElement implements
Serializable
+{
+ public abstract String getServiceRefName();
+
+ public abstract void setServiceRefName(String name);
+
+ public abstract Object getAnnotatedElement();
+
+ public abstract void setAnnotatedElement(Object anElement);
+
+ public abstract boolean isProcessed();
+
+ public abstract void setProcessed(boolean flag);
+
+ public abstract void importStandardXml(Element element);
+
+ public abstract void importJBossXml(Element element);
+
+ public abstract void merge(ServiceRefMetaData targetRef);
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/ServiceRefMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+/**
+ * The default file adapter loads resources through an associated classloader.
+ * If no classload is set, the the thread context classloader will be used.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @since 25.01.2007
+ */
+public class URLLoaderAdapter implements UnifiedVirtualFile
+{
+ private URL rootURL;
+ private URL resourceURL;
+ private transient URLClassLoader loader;
+
+ public URLLoaderAdapter(URL rootURL)
+ {
+ this.rootURL = rootURL;
+ }
+
+ private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
+ {
+ this.rootURL = rootURL;
+ this.resourceURL = resourceURL;
+ this.loader = loader;
+ }
+
+ public UnifiedVirtualFile findChild(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null)
+ {
+ // Try the child as URL
+ try
+ {
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (resourceURL == null)
+ {
+ try
+ {
+ File file = new File(resourcePath);
+ if (file.exists())
+ resourceURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (resourceURL == null)
+ {
+ try
+ {
+ resourceURL = getResourceLoader().getResource(resourcePath);
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ if (resourceURL == null)
+ throw new IOException("Cannot get URL for: " + resourcePath);
+
+ return new URLLoaderAdapter(rootURL, loader, resourceURL);
+ }
+
+ public URL toURL()
+ {
+ if (resourceURL != null)
+ return resourceURL;
+ else
+ return rootURL;
+ }
+
+ private URLClassLoader getResourceLoader()
+ {
+ if (loader == null)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ loader = new URLClassLoader(new URL[]{rootURL}, ctxLoader);
+ }
+ return loader;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/URLLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
===================================================================
--- trunk/integration/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+
+/**
+ * An adaptor to a VirtualFile from jboss-vfs.jar
+ * jboss-vfs cannot be used in jboss-4.x because of its dependeny on
jboss-common-core.jar
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public interface UnifiedVirtualFile extends Serializable
+{
+ UnifiedVirtualFile findChild(String child) throws IOException;
+
+ URL toURL();
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/UnifiedVirtualFile.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,84 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+/**
+ * An abstract deployer that does nothing.
+ * Overwrite the deployer methods appropriately.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class AbstractDeployer implements Deployer
+{
+ public void create(DeploymentUnit unit)
+ {
+ }
+
+ public void destroy(DeploymentUnit unit)
+ {
+ }
+
+ public void start(DeploymentUnit unit)
+ {
+ }
+
+ public void stop(DeploymentUnit unit)
+ {
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/AbstractDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentManager.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentManager.java 2007-04-20
23:49:59 UTC (rev 2895)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentManager.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -57,7 +57,7 @@
// $Id$
-import java.util.ArrayList;
+import java.util.LinkedList;
import java.util.List;
/**
@@ -68,7 +68,7 @@
*/
public class BasicDeploymentManager implements DeploymentManager
{
- private List<Deployer> deployers = new ArrayList<Deployer>();
+ private List<Deployer> deployers = new LinkedList<Deployer>();
public List<Deployer> getDeployers()
{
Modified:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManager.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManager.java 2007-04-20
23:49:59 UTC (rev 2895)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManager.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -68,7 +68,7 @@
public interface DeploymentManager
{
/** The bean name in the kernel registry */
- static String BEAN_NAME = "WebServiceDeploymentManager";
+ static String BEAN_NAME = "WSDeploymentManager";
/** Get the list of registered deployers */
List<Deployer> getDeployers();
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManagerFactory.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManagerFactory.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManagerFactory.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,86 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+
+/**
+ * Get the deployment manager from the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class DeploymentManagerFactory
+{
+ private static DeploymentManager epRegistry;
+
+ public static DeploymentManager getDeploymentManager()
+ {
+ if (epRegistry == null)
+ {
+ Kernel kernel = KernelLocator.getKernel();
+ KernelRegistry registry = kernel.getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(DeploymentManager.BEAN_NAME);
+ epRegistry = (DeploymentManager)entry.getTarget();
+ }
+ return epRegistry;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/DeploymentManagerFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/EndpointNameDeployer.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/EndpointNameDeployer.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/EndpointNameDeployer.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,90 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * A deployer that gives the endpoint its name
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class EndpointNameDeployer extends AbstractDeployer
+{
+ public void create(DeploymentUnit unit)
+ {
+ for (Endpoint ep : unit.getService().getEndpoints())
+ {
+ ObjectName name = ep.getName();
+ if (name == null)
+ {
+ Class epImpl = ep.getEndpointImpl();
+ if (epImpl == null)
+ throw new IllegalStateException("Endpoint implementation bean cannot
be null: " + ep);
+
+ String className = epImpl.getName();
+ className = className.substring(className.lastIndexOf(".") + 1);
+ ep.setName(ObjectNameFactory.create("jboss.ws:endpoint=" +
className));
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/EndpointNameDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/RegisteringDeployer.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/RegisteringDeployer.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/RegisteringDeployer.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,88 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.management.EndpointRegistry;
+import org.jboss.ws.integration.management.EndpointRegistryFactory;
+
+
+/**
+ * A deployer that registers the endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class RegisteringDeployer extends AbstractDeployer
+{
+ public void create(DeploymentUnit unit)
+ {
+ EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+ for (Endpoint ep : unit.getService().getEndpoints())
+ {
+ registry.register(ep);
+ }
+ }
+
+ public void destroy(DeploymentUnit unit)
+ {
+ EndpointRegistry registry = EndpointRegistryFactory.getEndpointRegistry();
+ for (Endpoint ep : unit.getService().getEndpoints())
+ {
+ registry.unregister(ep);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/RegisteringDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/ValidatingDeployer.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/ValidatingDeployer.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/ValidatingDeployer.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,84 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+import javax.jws.WebService;
+import javax.xml.ws.Provider;
+
+import org.jboss.ws.integration.Endpoint;
+
+
+/**
+ * A deployer that validates the endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class ValidatingDeployer extends AbstractDeployer
+{
+ public void create(DeploymentUnit unit)
+ {
+ for (Endpoint ep : unit.getService().getEndpoints())
+ {
+ Class epImpl = ep.getEndpointImpl();
+ if (epImpl == null)
+ throw new IllegalStateException("Endpoint implementation bean cannot be
null: " + ep);
+
+ if (!epImpl.isAnnotationPresent(WebService.class) &&
!epImpl.isAnnotationPresent(Provider.class))
+ throw new IllegalStateException("Not a valid JAXWS endpoint: " +
epImpl.getName());
+ }
+ }
+}
\ No newline at end of file
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/deployment/ValidatingDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java 2007-04-20
23:49:59 UTC (rev 2895)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistry.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -72,7 +72,7 @@
public interface EndpointRegistry
{
/** The bean name in the kernel registry */
- static String BEAN_NAME = "WebServiceEndpointRegistry";
+ static String BEAN_NAME = "WSEndpointRegistry";
/** Get the list of registered endpoints */
Set<ObjectName> getEndpoints();
Added:
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
===================================================================
---
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
(rev 0)
+++
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,86 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.management;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.util.KernelLocator;
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+
+/**
+ * Get the endpoint registry from the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class EndpointRegistryFactory
+{
+ private static EndpointRegistry epRegistry;
+
+ public static EndpointRegistry getEndpointRegistry()
+ {
+ if (epRegistry == null)
+ {
+ Kernel kernel = KernelLocator.getKernel();
+ KernelRegistry registry = kernel.getRegistry();
+ KernelRegistryEntry entry = registry.getEntry(EndpointRegistry.BEAN_NAME);
+ epRegistry = (EndpointRegistry)entry.getTarget();
+ }
+ return epRegistry;
+ }
+}
Property changes on:
trunk/integration/src/main/java/org/jboss/ws/integration/management/EndpointRegistryFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicDeploymentTest.java
===================================================================
---
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicDeploymentTest.java 2007-04-20
23:49:59 UTC (rev 2895)
+++
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicDeploymentTest.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -55,12 +55,21 @@
*/
package org.jboss.test.ws.integration.basic;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
import junit.framework.Test;
import org.jboss.test.ws.integration.KernelBasedTest;
import org.jboss.test.ws.integration.KernelTestSetup;
+import org.jboss.ws.integration.BasicEndpoint;
+import org.jboss.ws.integration.BasicService;
+import org.jboss.ws.integration.deployment.BasicDeploymentUnit;
import org.jboss.ws.integration.deployment.DeploymentManager;
+import org.jboss.ws.integration.deployment.DeploymentManagerFactory;
import org.jboss.ws.integration.management.EndpointRegistry;
+import org.jboss.ws.integration.management.EndpointRegistryFactory;
/**
*
@@ -79,10 +88,22 @@
public void testDeployerOrder()
{
- DeploymentManager manger =
(DeploymentManager)setup.getRegisteredBean(DeploymentManager.BEAN_NAME);
- assertNotNull("DeploymentManager not null", manger);
+ DeploymentManager depManager = DeploymentManagerFactory.getDeploymentManager();
+ EndpointRegistry epRegistry = EndpointRegistryFactory.getEndpointRegistry();
- EndpointRegistry registry =
(EndpointRegistry)setup.getRegisteredBean(EndpointRegistry.BEAN_NAME);
- assertNotNull("EndpointRegistry not null", registry);
+ // create the deployment unit
+ BasicDeploymentUnit unit = new BasicDeploymentUnit();
+ BasicService service = new BasicService(unit);
+ service.addEndpoint(new BasicEndpoint(service, BasicEndpointImp.class));
+
+ // deploy the endpoints
+ depManager.deploy(unit);
+
+ // validate the number of deployed endpoints
+ Set<ObjectName> endpoints = epRegistry.getEndpoints();
+ assertEquals(1, endpoints.size());
+
+ // undeploy the endpoints
+ depManager.undeploy(unit);
}
}
Added:
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicEndpointImp.java
===================================================================
---
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicEndpointImp.java
(rev 0)
+++
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicEndpointImp.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,69 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.test.ws.integration.basic;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService
+public class BasicEndpointImp
+{
+ @WebMethod
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Property changes on:
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/BasicEndpointImp.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/InvalidEndpointImp.java
===================================================================
---
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/InvalidEndpointImp.java
(rev 0)
+++
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/InvalidEndpointImp.java 2007-04-23
06:06:16 UTC (rev 2896)
@@ -0,0 +1,68 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.test.ws.integration.basic;
+
+import javax.jws.WebMethod;
+
+//@WebService
+public class InvalidEndpointImp
+{
+ @WebMethod
+ public String echo(String msg)
+ {
+ return msg;
+ }
+}
Property changes on:
trunk/integration/src/test/java/org/jboss/test/ws/integration/basic/InvalidEndpointImp.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/src/test/resources/basic/basic-deployers.xml
===================================================================
--- trunk/integration/src/test/resources/basic/basic-deployers.xml 2007-04-20 23:49:59 UTC
(rev 2895)
+++ trunk/integration/src/test/resources/basic/basic-deployers.xml 2007-04-23 06:06:16 UTC
(rev 2896)
@@ -2,10 +2,24 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="WebServiceDeploymentManager"
class="org.jboss.ws.integration.deployment.BasicDeploymentManager">
- </bean>
+ <!-- A simple singleton that provides access to the Kernel -->
+ <bean name="KernelLocator"
class="org.jboss.kernel.plugins.util.KernelLocator"/>
- <bean name="WebServiceEndpointRegistry"
class="org.jboss.ws.integration.management.BasicEndpointRegistry">
+ <!-- The deployment manger registers the list of web service deployers -->
+ <bean name="WSDeploymentManager"
class="org.jboss.ws.integration.deployment.BasicDeploymentManager">
+ <property name="deployers">
+ <list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
+ <inject bean="WSValidatingDeployer"/>
+ <inject bean="WSEndpointNameDeployer"/>
+ <inject bean="WSRegisteringDeployer"/>
+ </list>
+ </property>
</bean>
-</deployment>
+ <bean name="WSValidatingDeployer"
class="org.jboss.ws.integration.deployment.ValidatingDeployer"/>
+ <bean name="WSEndpointNameDeployer"
class="org.jboss.ws.integration.deployment.EndpointNameDeployer"/>
+ <bean name="WSRegisteringDeployer"
class="org.jboss.ws.integration.deployment.RegisteringDeployer"/>
+
+ <bean name="WSEndpointRegistry"
class="org.jboss.ws.integration.management.BasicEndpointRegistry"/>
+
+</deployment>
\ No newline at end of file