[jboss-cvs] JBossAS SVN: r62930 - in projects/wsintegration: jbws-jboss42 and 26 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 8 23:36:06 EDT 2007
Author: thomas.diesler at jboss.com
Date: 2007-05-08 23:36:06 -0400 (Tue, 08 May 2007)
New Revision: 62930
Added:
projects/wsintegration/jbws-jboss42/
projects/wsintegration/jbws-jboss42/trunk/
projects/wsintegration/jbws-jboss42/trunk/.classpath
projects/wsintegration/jbws-jboss42/trunk/.project
projects/wsintegration/jbws-jboss42/trunk/ant.properties.example
projects/wsintegration/jbws-jboss42/trunk/build.xml
projects/wsintegration/jbws-jboss42/trunk/src/
projects/wsintegration/jbws-jboss42/trunk/src/main/
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/component-info.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/etc/default.mf
projects/wsintegration/jbws-jboss42/trunk/src/main/java/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css
projects/wsintegration/jbws-jboss42/trunk/version.properties
Modified:
projects/wsintegration/jbws-jboss50/trunk/ant.properties.example
projects/wsintegration/jbws-jboss50/trunk/build.xml
projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml
projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml
projects/wsintegration/jbws-jboss50/trunk/src/main/etc/component-info.xml
projects/wsintegration/jbws-jboss50/trunk/version.properties
Log:
Add jbws-jboss42
Added: projects/wsintegration/jbws-jboss42/trunk/.classpath
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/.classpath (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/.classpath 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-4.2.x"/>
+ <classpathentry kind="output" path="output-eclipse"/>
+</classpath>
Added: projects/wsintegration/jbws-jboss42/trunk/.project
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/.project (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/.project 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jbws-jboss42</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/wsintegration/jbws-jboss42/trunk/ant.properties.example
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/ant.properties.example (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/ant.properties.example 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,26 @@
+#
+# A sample ant properties file
+#
+# $Id: ant.properties.example 2870 2007-04-15 14:54:22Z thomas.diesler at jboss.com $
+
+# JBoss Home
+#jboss42.home=/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA
+
+# The JBoss server instance
+jboss.server.instance=default
+
+# JBoss Repository
+#jboss.repository=file:/home/tdiesler/svn/jboss.local.repository
+jboss.repository=http://repository.jboss.org
+
+# JBossWS Release
+jboss.local.repository=/home/tdiesler/svn/jboss.local.repository
+
+# Force thirdparty HTTP get
+#force.thirdparty.get=true
+
+# Java Compiler options
+javac.debug=yes
+javac.deprecation=yes
+javac.fail.onerror=yes
+javac.verbose=no
Added: projects/wsintegration/jbws-jboss42/trunk/build.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/build.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/build.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,208 @@
+<?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="." name="JBossWS-JBoss42">
+
+ <import file="${basedir}/src/main/etc/ant-import/build-deploy.xml"/>
+ <import file="${basedir}/src/main/etc/ant-import/build-release.xml"/>
+ <import file="${basedir}/src/main/etc/ant-import/build-thirdparty.xml"/>
+
+ <!-- ================================================================== -->
+ <!-- Setup -->
+ <!-- ================================================================== -->
+
+ <property file="${basedir}/ant.properties"/>
+ <property file="${basedir}/version.properties"/>
+ <property environment="env"/>
+
+ <property name="jboss42.lib" value="${jboss42.home}/lib"/>
+ <property name="jboss42.client" value="${jboss42.home}/client"/>
+ <property name="jboss42.server" value="${jboss42.home}/server/${jboss.server.instance}"/>
+ <property name="jboss42.server.lib" value="${jboss42.server}/lib"/>
+ <property name="jboss42.server.deploy" value="${jboss42.server}/deploy"/>
+ <property name="jboss42.thirdparty" value="${jboss42.home}/../../../thirdparty"/>
+
+ <property name="jboss42.dir" value="${basedir}"/>
+ <property name="jboss42.src.dir" value="${jboss42.dir}/src/main"/>
+ <property name="jboss42.etc.dir" value="${jboss42.src.dir}/etc"/>
+ <property name="jboss42.java.dir" value="${jboss42.src.dir}/java"/>
+ <property name="jboss42.resources.dir" value="${jboss42.src.dir}/resources"/>
+ <property name="jboss42.output.dir" value="${jboss42.dir}/output"/>
+ <property name="jboss42.output.classes.dir" value="${jboss42.output.dir}/classes"/>
+ <property name="jboss42.output.etc.dir" value="${jboss42.output.dir}/etc"/>
+ <property name="jboss42.output.lib.dir" value="${jboss42.output.dir}/lib"/>
+
+ <property name="thirdparty.dir" value="${basedir}/thirdparty"/>
+
+ <property name="jboss42.available.file" value="${jboss42.client}/jboss-client.jar"/>
+ <available property="jboss42.available" file="${jboss42.available.file}"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="prepare">
+
+ <mkdir dir="${jboss42.output.dir}"/>
+
+ <checksum file="${basedir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+ <checksum file="${basedir}/version.properties" fileext=".md5"/>
+
+ <condition property="force.thirdparty.get">
+ <or>
+ <not>
+ <available file="${thirdparty.dir}" type="dir"/>
+ </not>
+ <isfalse value="${checksum.ok}"/>
+ </or>
+ </condition>
+
+ <tstamp>
+ <format property="build.id" pattern="yyyyMMddHHmm"/>
+ </tstamp>
+
+ </target>
+
+ <target name="jboss42-init" depends="prepare, thirdparty">
+ <fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
+ <available file="${jboss42.client}/jboss-ejb3-client.jar" property="jboss42.ejb3.available"/>
+ </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="jboss42-compile" depends="jboss42-compile-classes,jboss42-compile-etc" description="Compile all source files."/>
+
+ <!-- Compile integration java sources -->
+ <target name="jboss42-compile-classes" depends="jboss42-init">
+ <mkdir dir="${jboss42.output.classes.dir}"/>
+ <javac srcdir="${jboss42.java.dir}" sourcepath="" destdir="${jboss42.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+ <include name="org/jboss/ws/integration/jboss42/**"/>
+ <classpath refid="jboss42.integration.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Compile etc files (manifests and such) -->
+ <target name="jboss42-compile-etc" depends="jboss42-init">
+ <mkdir dir="${jboss42.output.etc.dir}"/>
+ <copy todir="${jboss42.output.etc.dir}" filtering="yes" overwrite="yes">
+ <fileset dir="${jboss42.etc.dir}">
+ <include name="component-info.xml"/>
+ <include name="default.mf"/>
+ </fileset>
+ <filterset>
+ <filter token="java.vm.version" value="${java.vm.version}"/>
+ <filter token="java.vm.vendor" value="${java.vm.vendor}"/>
+ <filter token="build.id" value="${build.id}"/>
+ <filter token="implementation.version" value="jbossws-${version.id}"/>
+ <filtersfile file="${basedir}/version.properties"/>
+ </filterset>
+ </copy>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Archives -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="jboss42-jars" depends="jboss42-compile,jboss42-module-jars" description="Builds all jar files.">
+ </target>
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="jboss42-module-jars" depends="jboss42-init">
+
+ <!-- Build jbossws-jboss42.jar -->
+ <mkdir dir="${jboss42.output.lib.dir}"/>
+ <jar jarfile="${jboss42.output.lib.dir}/jbossws-jboss42.jar" manifest="${jboss42.output.etc.dir}/default.mf">
+ <fileset dir="${jboss42.output.classes.dir}">
+ <include name="org/jboss/ws/integration/jboss42/**"/>
+ </fileset>
+ <metainf dir="${jboss42.resources.dir}/jbossws-jboss42.jar/META-INF"/>
+ </jar>
+
+ <!-- Build jbossws-context.war -->
+ <war warfile="${jboss42.output.lib.dir}/jbossws-context.war" webxml="${jboss42.resources.dir}/jbossws.war/WEB-INF/web.xml">
+ <fileset dir="${jboss42.resources.dir}/jbossws.war">
+ <include name="index.html"/>
+ <include name="styles.css"/>
+ </fileset>
+ <webinf dir="${jboss42.resources.dir}/jbossws.war/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
+ <!-- Build jbossws42.sar -->
+ <jar jarfile="${jboss42.output.lib.dir}/jbossws42.sar" manifest="${jboss42.output.etc.dir}/default.mf">
+ <fileset dir="${jboss42.output.lib.dir}">
+ <include name="jbossws-jboss42.jar"/>
+ <include name="jbossws-context.war"/>
+ </fileset>
+ <fileset dir="${thirdparty.dir}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ <include name="policy.jar"/>
+ <include name="stax-api.jar"/>
+ <include name="wsdl4j.jar"/>
+ <include name="xmlsec.jar"/>
+ <include name="jboss-jaxws.jar"/>
+ <include name="jbossws-core.jar"/>
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ <fileset dir="${jboss42.resources.dir}">
+ <include name="jbossws.beans/META-INF/jboss-beans.xml"/>
+ </fileset>
+ <metainf dir="${thirdparty.dir}/jbossws-resources">
+ <include name="standard-*-config.xml"/>
+ </metainf>
+ <metainf dir="${jboss42.resources.dir}/jbossws.sar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
+ </jar>
+
+ <!-- Build jbossws42-src.zip -->
+ <zip zipfile="${jboss42.output.lib.dir}/jbossws42-src.zip" >
+ <fileset dir="${jboss42.java.dir}"/>
+ </zip>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Miscellaneous -->
+ <!-- ================================================================== -->
+
+ <target name="clean" depends="prepare" description="Cleans up most generated files.">
+ <delete dir="${jboss42.output.dir}"/>
+ </target>
+
+ <target name="main" description="Executes the default target (most)." depends="most"/>
+
+ <target name="most" description="Builds almost everything." depends="jboss42-jars"/>
+
+ <target name="all" description="Create a distribution zip file" depends="main">
+ </target>
+
+</project>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,107 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software
+Packages, regardless of the delivery mechanism. Each Software Package is a collective work
+under U.S. Copyright Law. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to
+the user ("Client") a license to the applicable collective work(s) pursuant to the
+GNU Lesser General Public License v. 2.1 except for the following Software Packages:
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the
+GNU General Public License v.2;
+
+(b) JBoss Rules, which is licensed pursuant to the Apache License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database,
+it may purchase a license from Sleepycat Software);
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1,
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various
+royalty-free patent licenses.
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1. The Software. "Software Packages" refer to the various software modules that are created and made available
+for distribution by the JBoss.org open source community at http://www.jboss.org. Each of the Software Packages
+may be comprised of hundreds of software components. The end user license agreement for each component is located in
+the component's source code. With the exception of certain image files identified in Section 2 below,
+the license terms for the components permit Client to copy, modify, and redistribute the component,
+in both source code and binary code forms. This agreement does not limit Client's rights under,
+or grant Client rights that supersede, the license terms of any particular component.
+
+2. Intellectual Property Rights. The Software Packages are owned by Red Hat and others and are protected under copyright
+and other laws. Title to the Software Packages and any component, or to any copy, modification, or merged portion shall
+remain with the aforementioned, subject to the applicable license. The "JBoss" trademark, "Red Hat" trademark, the
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates
+in the U.S. and other countries. This agreement permits Client to distribute unmodified copies of the Software Packages
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/. Client must abide by
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified.
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.
+
+3. Limited Warranty. Except as specifically stated in this Paragraph 3 or a license for a particular
+component, to the maximum extent permitted under applicable law, the Software Packages and the
+components are provided and licensed "as is" without warranty of any kind, expressed or implied,
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements
+or that the operation of the Software Packages will be entirely error free or appear precisely as described
+in the accompanying documentation. This warranty extends only to the party that purchases the Services
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor.
+
+4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies
+described below are accepted by Client as its only remedies. Red Hat's entire liability, and Client's
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or
+refund the money paid by Client for the Software. To the maximum extent permitted by applicable law,
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential
+damages, including lost profits or lost savings arising out of the use or inability to use the Software,
+even if Red Hat or such dealer has been advised of the possibility of such damages. In no event shall
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this
+Agreement during the twelve months preceding the action.
+
+5. Export Control. As required by U.S. law, Client represents and warrants that it:
+(a) understands that the Software Packages are subject to export controls under the
+U.S. Commerce Department's Export Administration Regulations ("EAR");
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria);
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity,
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government;
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by
+regulation or specific license;
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and
+address (including country) of each transferee;
+
+and (f) understands that countries other than the United States may restrict the import, use, or
+export of encryption products and that it shall be solely responsible for compliance with any such
+import, use, or export restrictions.
+
+6. Third Party Programs. Red Hat may distribute third party software programs with the Software Packages
+that are not part of the Software Packages and which Client must install separately. These third party
+programs are subject to their own license terms. The license terms either accompany the programs or
+can be viewed at http://www.redhat.com/licenses/. If Client does not agree to abide by the applicable
+license terms for such programs, then Client may not install them. If Client wishes to install the programs
+on more than one system or transfer the programs to another party, then Client must contact the licensor
+of the programs.
+
+7. General. If any provision of this agreement is held to be unenforceable, that shall not affect the
+enforceability of the remaining provisions. This License Agreement shall be governed by the laws of the
+State of North Carolina and of the United States, without regard to any conflict of laws provisions,
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc. All rights reserved.
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.
+All other trademarks are the property of their respective owners.
+
+ Page 1 of 1 18 October 2006
+
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/JBossORG-EULA.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,56 @@
+<?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 name="JBossWS-Deploy">
+
+ <!-- ================================================================== -->
+ <!-- Deployment JBoss42 -->
+ <!-- ================================================================== -->
+
+ <!-- Deploy jbossws to jboss42 -->
+ <target name="deploy-jboss42" depends="jboss42-jars" description="Deploy jbossws">
+
+ <fail message="Not available: ${jboss42.available.file}" unless="jboss42.available"/>
+
+ <copy todir="${jboss42.home}/bin" overwrite="true">
+ <fileset dir="${thirdparty.dir}/jbossws-resources">
+ <include name="*.bat"/>
+ <include name="*.sh"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss42.home}/client" overwrite="true">
+ <fileset dir="${thirdparty.dir}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-jaxws.jar"/>
+ <include name="jboss-saaj.jar"/>
+ <include name="jbossws-client.jar"/>
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ <include name="jaxb-xjc.jar"/>
+ <include name="wsdl4j.jar"/>
+ <include name="jbossws-wsconsume-impl.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
+ <fileset dir="${thirdparty.dir}">
+ <include name="jboss-jaxrpc.jar"/>
+ <include name="jboss-jaxws.jar"/>
+ <include name="jboss-saaj.jar"/>
+ </fileset>
+ </copy>
+ <delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+ <mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+ <unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss42.output.lib.dir}/jbossws42.sar"/>
+ </target>
+
+</project>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-deploy.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,38 @@
+<?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="release" name="JBossWS Release">
+
+ <!-- Release to jboss.local.repository -->
+ <target name="release" depends="jboss42-jars"
+ description="Release to jboss.local.repository">
+
+ <!-- jboss/jbossws-jboss42 -->
+ <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
+ <mkdir dir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"/>
+ <copy todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib" overwrite="true">
+ <fileset dir="${jboss42.output.lib.dir}">
+ <include name="jbossws-jboss42.jar"/>
+ <include name="jbossws42.sar"/>
+ <include name="jbossws42-src.zip"/>
+ </fileset>
+ </copy>
+ <copy tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml" file="${jboss42.etc.dir}/component-info.xml" filtering="true" overwrite="true">
+ <filterset>
+ <filtersfile file="${basedir}/version.properties"/>
+ </filterset>
+ </copy>
+
+ </target>
+
+</project>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,105 @@
+<?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="thirdparty" name="JBossWS-Thirdparty">
+
+ <!-- ========= -->
+ <!-- Libraries -->
+ <!-- ========= -->
+
+ <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+ </target>
+
+ <target name="thirdparty-get" if="force.thirdparty.get"
+ description="Gets the thirdparty libraries">
+
+ <mkdir dir="${thirdparty.dir}"/>
+ <get src="${jboss.repository}/apache-xmlsec/${apache-xmlsec}/lib/xmlsec.jar" dest="${thirdparty.dir}/xmlsec.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j.jar" dest="${thirdparty.dir}/wsdl4j.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/ibm-wsdl4j/${ibm-wsdl4j}/lib/wsdl4j-src.jar" dest="${thirdparty.dir}/wsdl4j-src.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar" dest="${thirdparty.dir}/jboss-common-core-sources.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/common-logging-log4j/${jboss-common-logging-log4j}/lib/jboss-logging-log4j.jar" dest="${thirdparty.dir}/jboss-logging-log4j.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar" dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar" dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-client.jar" dest="${thirdparty.dir}/jbossws-client.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-core.jar" dest="${thirdparty.dir}/jbossws-core.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jbossws-resources.zip" dest="${thirdparty.dir}/jbossws-resources.zip" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-saaj.jar" dest="${thirdparty.dir}/jboss-saaj.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxrpc.jar" dest="${thirdparty.dir}/jboss-jaxrpc.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws/${jboss-jbossws}/lib/jboss-jaxws.jar" dest="${thirdparty.dir}/jboss-jaxws.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-spi/${jboss-jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar" dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer.jar" dest="${thirdparty.dir}/jboss-microcontainer.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/stax-api/${stax-api}/lib/stax-api.jar" dest="${thirdparty.dir}/stax-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
+
+ <mkdir dir="${thirdparty.dir}/jbossws-resources"/>
+ <unzip dest="${thirdparty.dir}/jbossws-resources" src="${thirdparty.dir}/jbossws-resources.zip"/>
+ </target>
+
+ <target name="thirdparty-classpath" >
+
+ <!-- The compile classpath for jboss42 integration -->
+ <path id="jboss42.integration.classpath">
+ <pathelement location="${jboss42.lib}/jboss-jmx.jar"/>
+ <pathelement location="${jboss42.lib}/jboss-system.jar"/>
+ <pathelement location="${jboss42.server.lib}/jboss.jar"/>
+ <pathelement location="${jboss42.server.lib}/jboss-j2ee.jar"/>
+ <pathelement location="${jboss42.server.lib}/jboss-ejb3x.jar"/>
+ <pathelement location="${jboss42.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss42.server.deploy}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <pathelement location="${jboss42.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+ <pathelement location="${jboss42.server.deploy}/ejb3.deployer/jboss-ejb3.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-common-core.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-dependency.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-jaxrpc.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-jaxws.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-logging-spi.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-microcontainer.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-saaj.jar"/>
+ <pathelement location="${thirdparty.dir}/jboss-xml-binding.jar"/>
+ <pathelement location="${thirdparty.dir}/jbossws-core.jar"/>
+ <pathelement location="${thirdparty.dir}/jbossws-spi.jar"/>
+ <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ </path>
+
+ <!-- The compile classpath for jboss40 integration -->
+ <path id="jboss40.integration.classpath">
+ <pathelement location="${jboss40.lib}/jboss-jmx.jar"/>
+ <pathelement location="${jboss40.lib}/jboss-system.jar"/>
+ <pathelement location="${jboss40.server.lib}/jboss.jar"/>
+ <pathelement location="${jboss40.server.deploy}/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+ <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+ <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-ejb3.jar"/>
+ <pathelement location="${jboss40.server.deploy}/ejb3.deployer/jboss-ejb3x.jar"/>
+ </path>
+
+ <!-- The compile classpath for tomcat integration -->
+ <path id="tomcat.integration.classpath">
+ </path>
+
+ </target>
+
+</project>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/ant-import/build-thirdparty.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/component-info.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/component-info.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,24 @@
+<project name="jboss/jbossws-jboss42">
+
+ <component id="jboss/jbossws-jboss42"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id@"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-jboss42.jar"/>
+ <artifact id="jbossws42.sar"/>
+ <artifact id="jbossws42-src.zip"/>
+
+ <import componentref="jboss/jbossws">
+ <compatible version="@jboss-jbossws@"/>
+ </import>
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@jboss-jbossws-spi@"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/etc/default.mf
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/etc/default.mf (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/etc/default.mf 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Created-By: @java.vm.version@ (@java.vm.vendor@)
+Specification-Title: @specification.title@
+Specification-Version: @specification.version@
+Specification-Vendor: @specification.vendor@
+Implementation-Title: @implementation.title@
+Implementation-URL: @implementation.url@
+Implementation-Version: @implementation.version@ (build=@build.id@)
+Implementation-Vendor: @implementation.vendor@
+Implementation-Vendor-Id: @implementation.vendor.id@
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,41 @@
+/*
+ * 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.jboss42;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+
+//$Id$
+
+
+/**
+ * An interface for all web service deployer hooks
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 24-Apr-2007
+ */
+public interface DeployerHook
+{
+ void deploy(DeploymentInfo unit) throws DeploymentException;
+
+ void undeploy(DeploymentInfo unit);
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,153 @@
+/*
+ * 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.jboss42;
+
+//$Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.deployment.SubDeployerInterceptorSupport;
+import org.jboss.mx.server.Invocation;
+import org.jboss.mx.util.MBeanProxy;
+
+/**
+ * A deployer service that manages WS4EE compliant Web Services
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-May-2007
+ */
+public abstract class DeployerInterceptor extends SubDeployerInterceptorSupport implements DeployerInterceptorMBean
+{
+ // The main deployer
+ private MainDeployerMBean mainDeployer;
+
+ private List<DeployerHook> phaseOneHooks = new LinkedList<DeployerHook>();
+ private List<DeployerHook> phaseTwoHooks = new LinkedList<DeployerHook>();
+
+ public void addPhaseOneHook(DeployerHook hook)
+ {
+ log.debug("Add phase-one deployer hook: " + hook);
+ phaseOneHooks.add(hook);
+ }
+
+ public void removePhaseOneHook(DeployerHook hook)
+ {
+ log.debug("Remove phase-one deployer hook: " + hook);
+ phaseOneHooks.remove(hook);
+ }
+
+ public void addPhaseTwoHook(DeployerHook hook)
+ {
+ log.debug("Add phase-two deployer hook: " + hook);
+ phaseTwoHooks.add(hook);
+ }
+
+ public void removePhaseTwoHook(DeployerHook hook)
+ {
+ log.debug("Remove phase-two deployer hook: " + hook);
+ phaseTwoHooks.remove(hook);
+ }
+
+ @Override
+ protected final Object create(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseOneHooks)
+ deployer.deploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object start(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseTwoHooks)
+ deployer.deploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object stop(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseTwoHooks)
+ deployer.undeploy(unit);
+
+ return retn;
+ }
+
+ @Override
+ protected final Object destroy(Invocation invocation, DeploymentInfo unit) throws Throwable
+ {
+ Object retn = invokeNext(invocation);
+
+ for (DeployerHook deployer : phaseOneHooks)
+ deployer.undeploy(unit);
+
+ return retn;
+ }
+
+ /** Create the deployer service
+ */
+ protected void createService() throws Exception
+ {
+ mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server);
+ super.attach();
+ }
+
+ /** Destroy the deployer service
+ */
+ protected void destroyService()
+ {
+ super.detach();
+ }
+
+ /**
+ * Handle all webservice deployment exceptions.
+ * You can either simply log the problem and keep the EJB/WAR module
+ * alive or undeploy properly.
+ */
+ protected void handleStartupException(DeploymentInfo di, Throwable th)
+ {
+ log.error("Cannot startup webservice for: " + di.shortName, th);
+ mainDeployer.undeploy(di);
+ }
+
+ /**
+ * Handle all webservice deployment exceptions.
+ *
+ * You can either simply logs the problem and keep the EJB/WAR module
+ * alive or undeploy properly.
+ */
+ protected void handleShutdownException(String moduleName, Throwable th)
+ {
+ log.error("Cannot shutdown webservice for: " + moduleName, th);
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42;
+
+//$Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB-2.1 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorEJB21 extends DeployerInterceptor implements DeployerInterceptorEJB21MBean
+{
+
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -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.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorEJB21MBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB21");
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21MBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,34 @@
+/*
+ * 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.jboss42;
+
+// $Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web-Services for EJB3 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 10-May-2005
+ */
+public class DeployerInterceptorEJB3 extends DeployerInterceptor implements DeployerInterceptorEJB3MBean
+{
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -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.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorEJB3MBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB3");
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3MBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,34 @@
+/*
+ * 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.jboss42;
+
+// $Id$
+
+/**
+ * A deployer service that manages WS4EE compliant Web Services for WAR
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 15-Jan-2005
+ */
+public class DeployerInterceptorJSE extends DeployerInterceptor implements DeployerInterceptorJSEMBean
+{
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.integration.jboss42;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployment.SubDeployerInterceptorMBean;
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorJSEMBean extends DeployerInterceptorMBean
+{
+ //default object name
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerJSE");
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSEMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,39 @@
+/*
+ * 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.jboss42;
+
+import org.jboss.deployment.SubDeployerInterceptorMBean;
+
+/**
+ * MBean interface.
+ * @since 19-Jan-2005
+ */
+public interface DeployerInterceptorMBean extends SubDeployerInterceptorMBean
+{
+ void addPhaseOneHook(DeployerHook deployer);
+
+ void removePhaseOneHook(DeployerHook deployer);
+
+ void addPhaseTwoHook(DeployerHook deployer);
+
+ void removePhaseTwoHook(DeployerHook deployer);
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/DeployerInterceptorMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,87 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public abstract class AbstractApplicationMetaDataAdapter
+{
+ public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
+ {
+ udi.addAttachment(ApplicationMetaData.class, apmd);
+
+ UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+ buildUnifiedBeanMetaData(umd, apmd);
+ umd.setConfigName(apmd.getConfigName());
+ umd.setConfigFile(apmd.getConfigFile());
+ umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+ umd.setSecurityDomain(apmd.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+ return umd;
+ }
+
+ protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData apmd)
+ {
+ return new PublishLocationAdapter ()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return apmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ protected void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData metaData)
+ {
+ List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+ Iterator it = metaData.getEnterpriseBeans();
+ while (it.hasNext())
+ {
+ BeanMetaData bmd = (BeanMetaData)it.next();
+ UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
+ }
+ umd.setEnterpriseBeans(beans);
+ }
+
+ protected abstract UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,139 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.integration.deployment.DeployerManager;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.integration.jboss42.DeployerHook;
+import org.jboss.ws.integration.jboss42.DeployerInterceptorMBean;
+
+/**
+ * An abstract web service deployer.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHook implements DeployerHook
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ protected DeployerManager deployerManager;
+ private List<ObjectName> phaseOneInterceptors;
+ private List<ObjectName> phaseTwoInterceptors;
+
+ public void setDeployerManager(DeployerManager deploymentManager)
+ {
+ this.deployerManager = deploymentManager;
+ }
+
+ public void setPhaseOneInterceptors(List<ObjectName> phaseOneInterceptors)
+ {
+ this.phaseOneInterceptors = phaseOneInterceptors;
+ }
+
+ public void setPhaseTwoInterceptors(List<ObjectName> phaseTwoInterceptors)
+ {
+ this.phaseTwoInterceptors = phaseTwoInterceptors;
+ }
+
+ /** Return true if this deployment should be ignored
+ */
+ public boolean ignoreDeployment(DeploymentInfo unit)
+ {
+ return false;
+ }
+
+ /** Add the hooks to the interceptors
+ */
+ public void start()
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ try
+ {
+ if (phaseOneInterceptors != null)
+ {
+ for (ObjectName oname : phaseOneInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.addPhaseOneHook(this);
+ }
+ }
+
+ if (phaseTwoInterceptors != null)
+ {
+ for (ObjectName oname : phaseTwoInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.addPhaseTwoHook(this);
+ }
+ }
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ throw new WSDeploymentException(e);
+ }
+ }
+
+ /** Add the hooks to the interceptors
+ */
+ public void stop()
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ try
+ {
+ if (phaseOneInterceptors != null)
+ {
+ for (ObjectName oname : phaseOneInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.removePhaseOneHook(this);
+ }
+ }
+
+ if (phaseTwoInterceptors != null)
+ {
+ for (ObjectName oname : phaseTwoInterceptors)
+ {
+ DeployerInterceptorMBean interceptor = (DeployerInterceptorMBean)MBeanProxy.get(DeployerInterceptorMBean.class, oname, server);
+ interceptor.removePhaseTwoHook(this);
+ }
+ }
+ }
+ catch (MBeanProxyCreationException e)
+ {
+ throw new WSDeploymentException(e);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,34 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+/**
+ * An abstract deployer for EJB Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
+{
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,63 @@
+/*
+ * 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.jboss42.jbossws;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+
+//$Id$
+
+/**
+ * An abstract deployer for JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class AbstractDeployerHookJSE extends ArchiveDeployerHook
+{
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if ((unit.metaData instanceof WebMetaData) == false)
+ return false;
+
+ return true;
+ }
+
+ static class Servlet
+ {
+ String servletName;
+ String servletClass;
+ public Servlet(String servletName, String servletClass)
+ {
+ this.servletName = servletName;
+ this.servletClass = servletClass;
+ }
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+ public String getServletName()
+ {
+ return servletName;
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/AbstractDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,80 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedSessionMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class ApplicationMetaDataAdapter extends AbstractApplicationMetaDataAdapter
+{
+ protected UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+ {
+ UnifiedBeanMetaData ubmd = null;
+ if (bmd instanceof SessionMetaData)
+ {
+ ubmd = new UnifiedSessionMetaData();
+ }
+ else if (bmd instanceof MessageDrivenMetaData)
+ {
+ ubmd = new UnifiedMessageDrivenMetaData();
+ ((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(bmd.getEjbName());
+ ubmd.setEjbClass(bmd.getEjbClass());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+ ubmd.setHome(bmd.getHome());
+ ubmd.setLocalHome(bmd.getLocalHome());
+ ubmd.setJndiName(bmd.getJndiName());
+ ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+ EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ UnifiedEjbPortComponentMetaData upcmd = new UnifiedEjbPortComponentMetaData();
+ upcmd.setPortComponentName(pcmd.getPortComponentName());
+ upcmd.setPortComponentURI(pcmd.getPortComponentURI());
+ upcmd.setAuthMethod(pcmd.getAuthMethod());
+ upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ ubmd.setPortComponent(upcmd);
+ }
+ }
+ return ubmd;
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,157 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import java.io.IOException;
+import java.net.URL;
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.WebservicesFactory;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.w3c.dom.Element;
+
+/**
+ * An abstract web service deployer.
+ *
+ * deploy(unit)
+ * if(isWebServiceDeployment)
+ * dep = createDeployment(unit)
+ * deploy(dep)
+ *
+ * undeploy(unit)
+ * dep = getDeployment(unit)
+ * undeploy(dep)
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public abstract class ArchiveDeployerHook extends AbstractDeployerHook
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public abstract DeploymentType getDeploymentType();
+
+ /** Depending on the type of deployment, this method should return true
+ * if the deployment contains web service endpoints.
+ */
+ public abstract boolean isWebServiceDeployment(DeploymentInfo unit);
+
+ /** Create the Deployment for a given DeploymentInfo
+ */
+ public abstract Deployment createDeployment(DeploymentInfo unit);
+
+ /** Get the Deployment for a given DeploymentInfo
+ */
+ public Deployment getDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = (Deployment)unit.context.get(Deployment.class);
+ return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
+ }
+
+ public void deploy(DeploymentInfo unit) throws DeploymentException
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ if (isWebServiceDeployment(unit))
+ {
+ log.debug("deploy: " + unit.shortName);
+ Deployment dep = getDeployment(unit);
+ if (dep == null)
+ {
+ dep = createDeployment(unit);
+ dep.getContext().addAttachment(DeploymentInfo.class, unit);
+ }
+
+ deployerManager.deploy(dep);
+ unit.context.put(Deployment.class, dep);
+ }
+ }
+
+ public void undeploy(DeploymentInfo unit)
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ Deployment dep = getDeployment(unit);
+ if (dep != null)
+ {
+ log.debug("undeploy: " + unit.shortName);
+ deployerManager.undeploy(dep);
+ unit.context.remove(Deployment.class);
+ }
+ }
+
+ /** Unmrashall the webservices.xml if there is one
+ */
+ protected WebservicesMetaData getWebservicesMetaData(DeploymentInfo unit, String wsFile)
+ {
+ WebservicesMetaData wsMetaData = (WebservicesMetaData)unit.context.get(WebservicesMetaData.class);
+ UnifiedVirtualFile vfWebservices = getWebservicesFile(unit, wsFile);
+ if (wsMetaData == null && vfWebservices != null)
+ {
+ try
+ {
+ URL wsURL = vfWebservices.toURL();
+ Element root = DOMUtils.parse(wsURL.openStream());
+ String namespaceURI = root.getNamespaceURI();
+ if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
+ {
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new WebservicesFactory(wsURL);
+ wsMetaData = (WebservicesMetaData)unmarshaller.unmarshal(wsURL.openStream(), factory, null);
+ unit.context.put(WebservicesMetaData.class, wsMetaData);
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new WSDeploymentException(ex);
+ }
+ }
+ return wsMetaData;
+ }
+
+ private UnifiedVirtualFile getWebservicesFile(DeploymentInfo unit, String wsFile)
+ {
+ try
+ {
+ UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(unit.localCl);
+ return (wsFile != null ? vfsRoot.findChild(wsFile) : null);
+ }
+ catch (IOException e)
+ {
+ return null;
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ArchiveDeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,62 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that injects the correct classloader into the UMDM
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ClassLoaderInjectionDeployer extends AbstractDeployer
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ DeploymentInfo unit = dep.getContext().getAttachment(DeploymentInfo.class);
+ if (unit == null)
+ throw new IllegalStateException("Cannot obtain deployement unit");
+
+ UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+ if (umd == null)
+ throw new IllegalStateException("Cannot obtain unified meta data");
+
+ ClassLoader classLoader = unit.ucl;
+
+ // Get the webapp context classloader and use it as the deploymet class loader
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ classLoader = webMetaData.getContextLoader();
+ }
+
+ umd.setClassLoader(classLoader);
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ClassLoaderInjectionDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,168 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class DeploymentInfoAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
+
+ private WebMetaDataAdapter webMetaDataAdapter;
+ private AbstractApplicationMetaDataAdapter appMetaDataAdapter;
+
+ public void setAppMetaDataAdapter(AbstractApplicationMetaDataAdapter applicationMetaDataAdapter)
+ {
+ this.appMetaDataAdapter = applicationMetaDataAdapter;
+ }
+
+ public void setWebMetaDataAdapter(WebMetaDataAdapter webMetaDataAdapter)
+ {
+ this.webMetaDataAdapter = webMetaDataAdapter;
+ }
+
+ public UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
+ {
+ udi.addAttachment(DeploymentInfo.class, di);
+
+ if (di.parent != null)
+ {
+ udi.parent = new UnifiedDeploymentInfo(null);
+ buildDeploymentInfo(udi.parent, di.parent);
+ }
+
+ udi.vfRoot = new ResourceLoaderAdapter(di.localCl);
+ udi.name = di.getCanonicalName();
+ udi.simpleName = di.shortName;
+ udi.url = getDeploymentURL(di);
+ udi.classLoader = di.annotationsCl;
+ udi.deployedObject = di.deployedObject;
+
+ buildMetaData(udi, di.metaData);
+
+ log.debug("UnifiedDeploymentInfo:\n" + udi);
+ return udi;
+ }
+
+ private URL getDeploymentURL(DeploymentInfo di)
+ {
+ URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
+ if ("file".equals(deploymentURL.getProtocol()))
+ {
+ String path = deploymentURL.getPath();
+ if (new File(path).isFile())
+ {
+ try
+ {
+ deploymentURL = new URL("jar:file:" + path + "!/");
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+ }
+ return deploymentURL;
+ }
+
+ private void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+ {
+ if (metaData instanceof WebMetaData)
+ {
+ udi.metaData = webMetaDataAdapter.buildUnifiedWebMetaData(udi, (WebMetaData)metaData);
+ udi.webappURL = udi.url;
+ }
+ else if (metaData instanceof ApplicationMetaData)
+ {
+ udi.metaData = appMetaDataAdapter.buildUnifiedApplicationMetaData(udi, (ApplicationMetaData)metaData);
+ }
+ else if (udi.deployedObject != null)
+ {
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+
+ ArrayList<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+ for (Object container : ejb3Module.getContainers().values())
+ {
+ if (container instanceof StatelessContainer)
+ {
+ StatelessContainer slc = (StatelessContainer)container;
+ UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
+ uslc.setEjbName(slc.getEjbName());
+ uslc.setEjbClass(slc.getBeanClassName());
+ beans.add(uslc);
+ }
+ }
+
+ UnifiedApplicationMetaData appMetaData = new UnifiedApplicationMetaData();
+ appMetaData.setEnterpriseBeans(beans);
+ udi.metaData = appMetaData;
+ }
+ }
+
+ public static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -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.jboss42.jbossws;
+
+// $Id$
+
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.integration.KernelLocator;
+
+/**
+ * @author Thomas.Diesler at jboss.org
+ * @since 10-Mar-2007
+ */
+public class DeploymentInfoAdapterFactory
+{
+ // Hide ctor
+ private DeploymentInfoAdapterFactory()
+ {
+ }
+
+ public static DeploymentInfoAdapter newInstance()
+ {
+ KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+ KernelRegistryEntry entry = registry.getEntry("DeploymentInfoAdapter");
+ return (DeploymentInfoAdapter)entry.getTarget();
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/DeploymentInfoAdapterFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,267 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.Invocation;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.invocation.InvocationType;
+import org.jboss.invocation.PayloadKey;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.security.SecurityAssociation;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB21 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerEJB21.class);
+
+ private String jndiName;
+ private MBeanServer server;
+ private ObjectName objectName;
+
+ /** Initialize the service endpoint */
+ @Override
+ public void init(Endpoint endpoint)
+ {
+ super.init(endpoint);
+
+ server = MBeanServerLocator.locateJBoss();
+
+ ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+ if (sepMetaData == null)
+ throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+ String ejbName = sepMetaData.getLinkName();
+ if (ejbName == null)
+ throw new WSException("Cannot obtain ejb-link from port component");
+
+ UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+ UnifiedApplicationMetaData applMetaData = (UnifiedApplicationMetaData)udi.metaData;
+ UnifiedBeanMetaData beanMetaData = (UnifiedBeanMetaData)applMetaData.getBeanByEjbName(ejbName);
+ if (beanMetaData == null)
+ throw new WSException("Cannot obtain ejb meta data for: " + ejbName);
+
+ // verify the service endpoint
+ String seiName = sepMetaData.getServiceEndpointInterfaceName();
+ if (sepMetaData.getType() == Type.JAXRPC && seiName != null)
+ {
+ String bmdSEI = beanMetaData.getServiceEndpointInterface();
+ if (seiName.equals(bmdSEI) == false)
+ throw new WSException("Endpoint meta data defines SEI '" + seiName + "', <service-endpoint> in ejb-jar.xml defines '" + bmdSEI + "'");
+ }
+
+ // get the bean's JNDI name
+ jndiName = beanMetaData.getContainerObjectNameJndiName();
+ if (jndiName == null)
+ throw new WSException("Cannot obtain JNDI name for: " + ejbName);
+
+ objectName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + jndiName + ",service=EJB");
+
+ // Dynamically add the service endpoint interceptor
+ // http://jira.jboss.org/jira/browse/JBWS-758
+ try
+ {
+ EjbModule ejbModule = (EjbModule)server.getAttribute(objectName, "EjbModule");
+ StatelessSessionContainer container = (StatelessSessionContainer)ejbModule.getContainer(ejbName);
+
+ boolean injectionPointFound = false;
+ Interceptor prev = container.getInterceptor();
+ while (prev != null && prev.getNext() != null)
+ {
+ Interceptor next = prev.getNext();
+ if (next.getNext() == null)
+ {
+ log.debug("Inject service endpoint interceptor after: " + prev.getClass().getName());
+ ServiceEndpointInterceptor sepInterceptor = new ServiceEndpointInterceptor();
+ prev.setNext(sepInterceptor);
+ sepInterceptor.setNext(next);
+ injectionPointFound = true;
+ }
+ prev = next;
+ }
+ if (injectionPointFound == false)
+ log.warn("Cannot service endpoint interceptor injection point");
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot add service endpoint interceptor", ex);
+ }
+ }
+
+ /** Load the SEI implementation bean if necessary
+ */
+ public Class loadServiceEndpoint()
+ {
+ if (server.isRegistered(objectName) == false)
+ throw new WSException("Cannot find service endpoint target: " + objectName);
+
+ return null;
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ @Override
+ protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+ {
+ return null;
+ }
+
+ /** Invoke an instance of the SEI implementation bean */
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+ {
+ log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+ // these are provided by the ServerLoginHandler
+ Principal principal = SecurityAssociation.getPrincipal();
+ Object credential = SecurityAssociation.getCredential();
+
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+
+ // invoke on the container
+ try
+ {
+ // setup the invocation
+ Method method = epInv.getJavaMethod();
+ Object[] args = epInv.getRequestPayload();
+ Invocation inv = new Invocation(null, method, args, null, principal, credential);
+
+ // EJB2.1 endpoints will only get an JAXRPC context
+ if ((msgContext instanceof javax.xml.rpc.handler.MessageContext) == false)
+ msgContext = new SOAPMessageContextJAXRPC(msgContext);
+
+ inv.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+ inv.setValue(InvocationKey.SOAP_MESSAGE, msgContext.getSOAPMessage());
+ inv.setType(InvocationType.SERVICE_ENDPOINT);
+
+ // Set the handler callback and endpoint invocation
+ ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+ inv.setValue(HandlerCallback.class.getName(), new HandlerCallbackImpl(sepMetaData), PayloadKey.TRANSIENT);
+ inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
+
+ String[] sig = { Invocation.class.getName() };
+ Object retObj = server.invoke(objectName, "invoke", new Object[] { inv }, sig);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ public void destroyServiceEndpointInstance(Object seiImpl)
+ {
+ // do nothing
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ @Override
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return delegate.callRequestHandlerChain(sepMetaData, type);
+ else return true;
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return delegate.callResponseHandlerChain(sepMetaData, type);
+ else return true;
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
+ {
+ if (type == HandlerType.PRE)
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+ else return true;
+ }
+
+ // The ServiceEndpointInterceptor calls the methods in this callback
+ public class HandlerCallbackImpl implements HandlerCallback
+ {
+ private ServerEndpointMetaData sepMetaData;
+
+ public HandlerCallbackImpl(ServerEndpointMetaData sepMetaData)
+ {
+ this.sepMetaData = sepMetaData;
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callRequestHandlerChain(HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return true;
+ else return delegate.callRequestHandlerChain(sepMetaData, type);
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callResponseHandlerChain(HandlerType type)
+ {
+ if (type == HandlerType.PRE)
+ return true;
+ else return delegate.callResponseHandlerChain(sepMetaData, type);
+ }
+
+ /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
+ public boolean callFaultHandlerChain(HandlerType type, Exception ex)
+ {
+ if (type == HandlerType.PRE)
+ return true;
+ else return delegate.callFaultHandlerChain(sepMetaData, type, ex);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,192 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import javax.ejb.EJBContext;
+import javax.management.ObjectName;
+
+import org.jboss.aop.Dispatcher;
+import org.jboss.aop.MethodInfo;
+import org.jboss.ejb3.BeanContext;
+import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.stateless.StatelessBeanContext;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.injection.lang.reflect.BeanProperty;
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.jaxws.WebServiceContextEJB;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.server.AbstractInvocationHandler;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.invocation.InvocationContext;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * Handles invocations on EJB3 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerEJB3 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerEJB3.class);
+
+ private ObjectName objectName;
+
+ /** Initialize the service endpoint */
+ @Override
+ public void init(Endpoint endpoint)
+ {
+ super.init(endpoint);
+
+ ServerEndpointMetaData sepMetaData = endpoint.getMetaData(ServerEndpointMetaData.class);
+ if (sepMetaData == null)
+ throw new IllegalStateException("Cannot obtain endpoint meta data");
+
+ String ejbName = sepMetaData.getLinkName();
+ if (ejbName == null)
+ throw new WSException("Cannot obtain ejb-link from port component");
+
+ UnifiedDeploymentInfo udi = endpoint.getService().getDeployment().getContext().getAttachment(UnifiedDeploymentInfo.class);
+ String nameStr = "jboss.j2ee:name=" + ejbName + ",service=EJB3,jar=" + udi.simpleName;
+ if (udi.parent != null)
+ {
+ nameStr += ",ear=" + udi.parent.simpleName;
+ }
+
+ objectName = ObjectNameFactory.create(nameStr.toString());
+ }
+
+ /** Load the SEI implementation bean if necessary
+ */
+ public Class loadServiceEndpoint()
+ {
+ Dispatcher dispatcher = Dispatcher.singleton;
+ if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
+ throw new WSException("Cannot find service endpoint target: " + objectName);
+
+ return null;
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ @Override
+ protected Object createServiceEndpointInstance(Class seiImplClass, InvocationContext context) throws Exception
+ {
+ return null;
+ }
+
+ /** Invoke an instance of the SEI implementation bean */
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+ {
+ log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+
+ // invoke on the container
+ try
+ {
+ // setup the invocation
+ Method seiMethod = epInv.getJavaMethod();
+ Object[] args = epInv.getRequestPayload();
+
+ Dispatcher dispatcher = Dispatcher.singleton;
+ StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
+ Class beanClass = container.getBeanClass();
+
+ Method implMethod = getImplMethod(beanClass, seiMethod);
+ MethodInfo info = container.getMethodInfo(implMethod);
+
+ EJBContainerInvocation<StatelessContainer, StatelessBeanContext> ejb3Inv = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
+ ejb3Inv.setAdvisor(container);
+ ejb3Inv.setArguments(args);
+ ejb3Inv.setContextCallback(new ContextCallback());
+
+ Object retObj = ejb3Inv.invokeNext();
+
+ epInv.setReturnValue(retObj);
+ }
+ catch (Throwable th)
+ {
+ handleInvocationException(th);
+ }
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary */
+ public void destroyServiceEndpointInstance(Object seiImpl)
+ {
+ // do nothing
+ }
+
+ class ContextCallback implements BeanContextLifecycleCallback
+ {
+ private SOAPMessageContextJAXWS jaxwsMessageContext;
+ private SOAPMessageContextJAXRPC jaxrpcMessageContext;
+
+ public ContextCallback()
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext instanceof SOAPMessageContextJAXRPC)
+ {
+ jaxrpcMessageContext = (SOAPMessageContextJAXRPC)msgContext;
+ jaxwsMessageContext = new SOAPMessageContextJAXWS(msgContext);
+ }
+ else if (msgContext instanceof SOAPMessageContextJAXWS)
+ {
+ jaxwsMessageContext = (SOAPMessageContextJAXWS)msgContext;
+ jaxrpcMessageContext = new SOAPMessageContextJAXRPC(msgContext);
+ }
+ }
+
+ public void attached(BeanContext beanCtx)
+ {
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+ sbc.setMessageContextJAXRPC(jaxrpcMessageContext);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ {
+ EJBContext ejbCtx = beanCtx.getEJBContext();
+ beanProp.set(beanCtx.getInstance(), new WebServiceContextEJB(jaxwsMessageContext, ejbCtx));
+ }
+ }
+
+ public void released(BeanContext beanCtx)
+ {
+ StatelessBeanContext sbc = (StatelessBeanContext)beanCtx;
+ sbc.setMessageContextJAXRPC(null);
+
+ BeanProperty beanProp = sbc.getWebServiceContextProperty();
+ if (beanProp != null)
+ beanProp.set(beanCtx.getInstance(), null);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/InvocationHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,119 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC EJB21 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookEJB21 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_EJB21;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = new DeploymentImpl();
+ dep.setType(getDeploymentType());
+ dep.setClassLoader(unit.ucl);
+
+ Service service = dep.getService();
+
+ ApplicationMetaData appmd = (ApplicationMetaData)unit.metaData;
+ if (appmd == null)
+ throw new IllegalStateException("Deployment unit does not contain application meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, null);
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.getContext().addAttachment(ApplicationMetaData.class, appmd);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String ejbLink = pcmd.getEjbLink();
+ if (ejbLink == null)
+ throw new IllegalStateException("ejb-link cannot be null");
+
+ BeanMetaData beanMetaData = appmd.getBeanByEjbName(ejbLink);
+ if (beanMetaData == null)
+ throw new IllegalStateException("Cannot obtain bean meta data for: " + ejbLink);
+
+ String ejbClass = beanMetaData.getEjbClass();
+ try
+ {
+ ClassLoader loader = unit.ucl;
+ Class<?> epBean = loader.loadClass(ejbClass.trim());
+
+ // Create the endpoint
+ Endpoint endpoint = new EndpointImpl(service, epBean);
+ String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
+ endpoint.setName(ObjectNameFactory.create(nameStr));
+
+ service.addEndpoint(endpoint);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + ejbClass);
+ }
+ }
+ }
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if ((unit.metaData instanceof ApplicationMetaData) == false)
+ return false;
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "META-INF/webservices.xml");
+ return wsMetaData != null;
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,140 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.webservices.PortComponentMetaData;
+import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer JAXRPC JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXRPCDeployerHookJSE extends AbstractDeployerHookJSE
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXRPC_JSE;
+ }
+
+ /**
+ * Create an endpoint for every servlet-link in webservices.xml
+ */
+ @Override
+ public Deployment createDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = new DeploymentImpl();
+ dep.setType(getDeploymentType());
+ dep.setClassLoader(unit.annotationsCl);
+
+ Service service = dep.getService();
+
+ WebMetaData webMetaData = (WebMetaData)unit.metaData;
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+ if (wsMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain webservices meta data");
+
+ // Copy the attachments
+ dep.getContext().addAttachment(WebservicesMetaData.class, wsMetaData);
+ dep.getContext().addAttachment(WebMetaData.class, webMetaData);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+ {
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
+ {
+ String servletLink = pcmd.getServletLink();
+ if (servletLink == null)
+ throw new IllegalStateException("servlet-link cannot be null");
+
+ Servlet servlet = getServletForName(webMetaData, servletLink);
+ String servletClass = servlet.getServletClass();
+
+ try
+ {
+ ClassLoader loader = unit.annotationsCl;
+ Class<?> epBean = loader.loadClass(servletClass.trim());
+
+ // Create the endpoint
+ Endpoint endpoint = new EndpointImpl(service, epBean);
+ String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
+ endpoint.setName(ObjectNameFactory.create(nameStr));
+
+ service.addEndpoint(endpoint);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClass);
+ }
+ }
+ }
+
+ return dep;
+ }
+
+ private Servlet getServletForName(WebMetaData wmd, String servletLink)
+ {
+ Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClass = (String)entry.getValue();
+ if (servletLink.equals(servletName))
+ {
+ return new Servlet(servletName, servletClass);
+ }
+ }
+ throw new IllegalStateException("Cannot find servlet for link: " + servletLink);
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ WebservicesMetaData wsMetaData = getWebservicesMetaData(unit, "WEB-INF/webservices.xml");
+ return wsMetaData != null;
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,123 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS EJB3 Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookEJB3 extends AbstractDeployerHookEJB
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXWS_EJB3;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = new DeploymentImpl();
+ dep.setType(getDeploymentType());
+ dep.setClassLoader(unit.ucl);
+
+ Service service = dep.getService();
+
+ Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.getEJB3Module(unit.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof EJBContainer)
+ {
+ EJBContainer container = (EJBContainer)manager;
+ if (isWebServiceBean(container))
+ {
+ String ejbName = container.getEjbName();
+ Class epBean = container.getBeanClass();
+
+ // Create the endpoint
+ Endpoint endpoint = new EndpointImpl(service, epBean);
+ String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
+ endpoint.setName(ObjectNameFactory.create(nameStr));
+
+ service.addEndpoint(endpoint);
+ }
+ }
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ boolean isWebserviceDeployment = false;
+
+ // Check if the ejb3 contains annotated endpoints
+ Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.getEJB3Module(unit.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof EJBContainer)
+ {
+ EJBContainer container = (EJBContainer)manager;
+ if (isWebServiceBean(container))
+ {
+ isWebserviceDeployment = true;
+ break;
+ }
+ }
+ }
+
+ return isWebserviceDeployment;
+ }
+
+ private boolean isWebServiceBean(EJBContainer container)
+ {
+ boolean isWebServiceBean = false;
+ if (container instanceof StatelessContainer)
+ {
+ boolean isWebService = container.resolveAnnotation(WebService.class) != null;
+ boolean isWebServiceProvider = container.resolveAnnotation(WebServiceProvider.class) != null;
+ isWebServiceBean = isWebService || isWebServiceProvider;
+ }
+ return isWebServiceBean;
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,158 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.integration.Endpoint;
+import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.ObjectNameFactory;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.Service;
+import org.jboss.ws.integration.UnifiedVirtualFile;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+
+/**
+ * A deployer JAXWS JSE Endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class JAXWSDeployerHookJSE extends AbstractDeployerHookJSE
+{
+ /** Get the deployemnt type this deployer can handle
+ */
+ public DeploymentType getDeploymentType()
+ {
+ return DeploymentType.JAXWS_JSE;
+ }
+
+ @Override
+ public Deployment createDeployment(DeploymentInfo unit)
+ {
+ Deployment dep = new DeploymentImpl();
+ dep.setType(getDeploymentType());
+ dep.setClassLoader(unit.annotationsCl);
+
+ Service service = dep.getService();
+
+ WebMetaData webMetaData = (WebMetaData)unit.metaData;
+ if (webMetaData == null)
+ throw new IllegalStateException("Deployment unit does not contain web meta data");
+
+ // Copy the attachments
+ dep.getContext().addAttachment(WebMetaData.class, webMetaData);
+
+ List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+ for (Servlet servlet : servlets)
+ {
+ String servletName = servlet.getServletName();
+ String servletClass = servlet.getServletClass();
+
+ try
+ {
+ ClassLoader loader = unit.annotationsCl;
+ Class<?> epBean = loader.loadClass(servletClass.trim());
+
+ // Create the endpoint
+ Endpoint endpoint = new EndpointImpl(service, epBean);
+ String nameStr = Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
+ endpoint.setName(ObjectNameFactory.create(nameStr));
+
+ service.addEndpoint(endpoint);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClass);
+ continue;
+ }
+ }
+
+ return dep;
+ }
+
+ @Override
+ public boolean isWebServiceDeployment(DeploymentInfo unit)
+ {
+ if (super.isWebServiceDeployment(unit) == false)
+ return false;
+
+ boolean isWebServiceDeployment = false;
+ try
+ {
+ WebMetaData webMetaData = (WebMetaData)unit.metaData;
+ List<Servlet> servlets = getRelevantServlets(webMetaData, unit.annotationsCl);
+ isWebServiceDeployment = servlets.size() > 0;
+ }
+ catch (Exception ex)
+ {
+ log.error("Cannot process web deployment", ex);
+ }
+
+ return isWebServiceDeployment;
+ }
+
+ private List<Servlet> getRelevantServlets(WebMetaData webMetaData, ClassLoader loader)
+ {
+ List<Servlet> servlets = new ArrayList<Servlet>();
+ Iterator it = webMetaData.getServletClassMap().entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClassName = (String)entry.getValue();
+
+ // Skip JSPs
+ if (servletClassName == null || servletClassName.length() == 0)
+ continue;
+
+ try
+ {
+ Class<?> servletClass = loader.loadClass(servletClassName.trim());
+ boolean isWebService = servletClass.isAnnotationPresent(WebService.class);
+ boolean isWebServiceProvider = servletClass.isAnnotationPresent(WebServiceProvider.class);
+ if (isWebService || isWebServiceProvider)
+ servlets.add(new Servlet(servletName, servletClassName));
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + servletClassName);
+ continue;
+ }
+ }
+ return servlets;
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,61 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.deployment.DeploymentException;
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A basic hook that delegates a deployment manger.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class MainDeployerHook extends AbstractDeployerHook
+{
+ public void deploy(DeploymentInfo unit) throws DeploymentException
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ Deployment dep = (Deployment)unit.context.get(Deployment.class);
+ if (dep != null)
+ {
+ deployerManager.deploy(dep);
+ }
+ }
+
+ public void undeploy(DeploymentInfo unit)
+ {
+ if (ignoreDeployment(unit))
+ return;
+
+ Deployment dep = (Deployment)unit.context.get(Deployment.class);
+ if (dep != null)
+ {
+ deployerManager.undeploy(dep);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/MainDeployerHook.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,54 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A deployer that modifies the web.xml meta data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeployer extends AbstractDeployer
+{
+ private ServiceEndpointPublisher serviceEndpointPublisher;
+
+ public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+ {
+ this.serviceEndpointPublisher = serviceEndpointPublisher;
+ }
+
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement info");
+
+ serviceEndpointPublisher.rewriteWebXml(udi);
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ModifyWebMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,93 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.legacy.ServiceEndpoint;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
+
+/**
+ * A servlet that reports the serviceURL for a given service ID.
+ * <p/>
+ * When the web service client ENC is setup, it may contain port-component-link
+ * entries that point to service endpoints in the same top level deployment.
+ * The final serviceURL of those endpoints will become available after the
+ * reference to the javax.xml.rpc.Service is bound to JNDI.
+ * <p/>
+ * When the client does a lookup of the javax.xml.rpc.Service from JNDI the ObjectFactory
+ * will contact this servlet for the final serviceURL. It is acceptable that the client
+ * wsdl does not contain the correct serviceURL if the client is using the port-component-link element.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 29-May-2004
+ */
+public class PortComponentLinkServlet extends HttpServlet
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(PortComponentLinkServlet.class);
+
+ protected ServiceEndpointManager epManager;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ epManager = factory.getServiceEndpointManager();
+ }
+
+ /**
+ * Get the serviceURL as string for a given serviceID.
+ */
+ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ String pcLink = req.getParameter("pcLink");
+ if (pcLink == null)
+ throw new IllegalArgumentException("Cannot obtain request parameter 'pcLink'");
+
+ ServiceEndpoint serviceEndpoint = epManager.resolvePortComponentLink(pcLink);
+ ;
+ if (serviceEndpoint == null)
+ throw new WSException("Cannot resolve port-component-link: " + pcLink);
+
+ res.setContentType("text/plain");
+ PrintWriter out = res.getWriter();
+
+ String endpointAddress = serviceEndpoint.getServiceEndpointInfo().getServerEndpointMetaData().getEndpointAddress();
+ out.println(endpointAddress);
+
+ log.debug("Resolved " + pcLink + " to: " + endpointAddress);
+ out.close();
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/PortComponentLinkServlet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,57 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.security.Principal;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptor;
+import org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory;
+
+/**
+ * A JBoss specific SecurityAdaptorFactory
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class SecurityAssociationAdaptorFactoryImpl implements SecurityAssociationAdaptorFactory
+{
+ public SecurityAssociationAdaptor getSecurityAssociationAdaptor()
+ {
+ return new SecurityAccociationAdaptorImpl();
+ }
+
+ public class SecurityAccociationAdaptorImpl implements SecurityAssociationAdaptor
+ {
+ public void setPrincipal(Principal pricipal)
+ {
+ SecurityAssociation.setPrincipal(pricipal);
+ }
+
+ public void setCredential(Object credential)
+ {
+ SecurityAssociation.setCredential(credential);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/SecurityAssociationAdaptorFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss42.jbossws;
+
+//$Id$
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.AssemblyDescriptorMetaData;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB21 extends ServiceEndpointGeneratorEJB
+{
+ // logging support
+ protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB21.class);
+
+ /** Add the roles from ejb-jar.xml to the security roles
+ */
+ protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+ {
+ // Fix: http://jira.jboss.org/jira/browse/JBWS-309
+ ApplicationMetaData applMetaData = (ApplicationMetaData)udi.getAttachment(ApplicationMetaData.class);
+ AssemblyDescriptorMetaData assemblyDescriptor = applMetaData.getAssemblyDescriptor();
+ if (assemblyDescriptor != null)
+ {
+ Map securityRoles = assemblyDescriptor.getSecurityRoles();
+ if (securityRoles != null)
+ {
+ Iterator it = securityRoles.keySet().iterator();
+ while (it.hasNext())
+ {
+ Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+ Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+ roleName.appendChild(DOMUtils.createTextNode((String)it.next()));
+ }
+ }
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB21.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,96 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import javax.annotation.security.RolesAllowed;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.ServiceEndpointGeneratorEJB;
+import org.jboss.ws.core.utils.DOMUtils;
+import org.w3c.dom.Element;
+
+/**
+ * Generate a service endpoint deployment for EJB endpoints
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointGeneratorEJB3 extends ServiceEndpointGeneratorEJB
+{
+ // logging support
+ protected Logger log = Logger.getLogger(ServiceEndpointGeneratorEJB3.class);
+
+ /** Add the roles from ejb-jar.xml to the security roles
+ */
+ protected void addEJBSecurityRoles(Element webApp, UnifiedDeploymentInfo udi)
+ {
+ // The container objects below provide access to all of the ejb metadata
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+ for (Object manager : ejb3Module.getContainers().values())
+ {
+ if (manager instanceof StatelessContainer)
+ {
+ StatelessContainer container = (StatelessContainer)manager;
+
+ RolesAllowed anRolesAllowed = (RolesAllowed)container.resolveAnnotation(RolesAllowed.class);
+ if (anRolesAllowed != null)
+ {
+ for (String role : anRolesAllowed.value())
+ {
+ Element securityRole = (Element)webApp.appendChild(DOMUtils.createElement("security-role"));
+ Element roleName = (Element)securityRole.appendChild(DOMUtils.createElement("role-name"));
+ roleName.appendChild(DOMUtils.createTextNode(role));
+ }
+ }
+ }
+ }
+ }
+
+ private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointGeneratorEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,145 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.Invocation;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.CommonBinding;
+import org.jboss.ws.core.CommonBindingProvider;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.jaxrpc.SOAPFaultHelperJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.HandlerCallback;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
+
+/**
+ * This Interceptor does the ws4ee handler processing.
+ *
+ * According to the ws4ee spec the handler logic must be invoked after the container
+ * applied method level security to the invocation.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Sep-2005
+ */
+public class ServiceEndpointInterceptor extends AbstractInterceptor
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceEndpointInterceptor.class);
+
+ // Interceptor implementation --------------------------------------
+
+ /** Before and after we call the service endpoint bean, we process the handler chains.
+ */
+ public Object invoke(final Invocation mi) throws Exception
+ {
+ // If no msgContext, it's not for us
+ CommonMessageContext msgContext = (CommonMessageContext)mi.getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+ if (msgContext == null)
+ {
+ return getNext().invoke(mi);
+ }
+
+ // Get the endpoint invocation
+ EndpointInvocation epInv = (EndpointInvocation)mi.getValue(EndpointInvocation.class.getName());
+ OperationMetaData opMetaData = epInv.getOperationMetaData();
+
+ // Get the handler callback
+ HandlerCallback callback = (HandlerCallback)mi.getValue(HandlerCallback.class.getName());
+
+ // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+ if (callback != null && epInv != null)
+ {
+ try
+ {
+ // call the request handlers
+ boolean handlersPass = callback.callRequestHandlerChain(HandlerType.ENDPOINT);
+ handlersPass = handlersPass && callback.callRequestHandlerChain(HandlerType.POST);
+
+ // Call the next interceptor in the chain
+ if (handlersPass)
+ {
+ CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
+ CommonBinding binding = bindingProvider.getCommonBinding();
+
+ // Verify that the the message has not been mofified
+ CommonMessageContext messageContext = MessageContextAssociation.peekMessageContext();
+ if (messageContext.isModified())
+ {
+ log.debug("Handler modified payload, unbind message and update invocation args");
+ epInv = bindingProvider.getCommonBinding().unbindRequestMessage(opMetaData, messageContext.getMessageAbstraction());
+ }
+
+ // The SOAPContentElements stored in the EndpointInvocation might have changed after
+ // handler processing. Get the updated request payload. This should be a noop if request
+ // handlers did not modify the incomming SOAP message.
+ Object[] reqParams = epInv.getRequestPayload();
+ mi.setArguments(reqParams);
+ Object resObj = getNext().invoke(mi);
+ epInv.setReturnValue(resObj);
+
+ // Bind the response message
+ SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
+ msgContext.setSOAPMessage(resMessage);
+ }
+
+ // call the response handlers
+ handlersPass = callback.callResponseHandlerChain(HandlerType.POST);
+ handlersPass = handlersPass && callback.callResponseHandlerChain(HandlerType.ENDPOINT);
+
+ // update the return value after response handler processing
+ Object resObj = epInv.getReturnValue();
+
+ return resObj;
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ SOAPMessage faultMessage = SOAPFaultHelperJAXRPC.exceptionToFaultMessage(ex);
+ msgContext.setSOAPMessage(faultMessage);
+
+ // call the fault handlers
+ boolean handlersPass = callback.callFaultHandlerChain(HandlerType.POST, ex);
+ handlersPass = handlersPass && callback.callFaultHandlerChain(HandlerType.ENDPOINT, ex);
+ }
+ catch (Exception subEx)
+ {
+ log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+ }
+ throw ex;
+ }
+ }
+ else
+ {
+ log.warn("Handler callback not available");
+ return getNext().invoke(mi);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/ServiceEndpointInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,89 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.deployment.JAXRPCDeployment;
+import org.jboss.ws.core.deployment.JAXWSDeployment;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.ws.metadata.webservices.WebservicesMetaData;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class UnifiedDeploymentInfoDeployer extends AbstractDeployer
+{
+ private DeploymentInfoAdapter deploymentInfoAdapter;
+
+ public void setDeploymentInfoAdapter(DeploymentInfoAdapter deploymentInfoAdapter)
+ {
+ this.deploymentInfoAdapter = deploymentInfoAdapter;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ {
+ DeploymentInfo unit = dep.getContext().getAttachment(DeploymentInfo.class);
+ if (unit == null)
+ throw new IllegalStateException("Cannot obtain deployment unit");
+
+ DeploymentType type = dep.getType();
+ if (type.toString().startsWith("JAXWS"))
+ {
+ udi = new JAXWSDeployment(type);
+ deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ }
+ else
+ {
+ WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
+ udi = new JAXRPCDeployment(type, wsMetaData);
+ deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ }
+
+ dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/UnifiedDeploymentInfoDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,126 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.management.MBeanServer;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.MainDeployerMBean;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.core.deployment.ServiceEndpointPublisher;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.Deployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.integration.deployment.WSDeploymentException;
+
+/**
+ * Publish the HTTP service endpoint to Tomcat
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 12-May-2006
+ */
+public class WebAppDeployerDeployer implements Deployer
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(WebAppDeployerDeployer.class);
+
+ private ServiceEndpointPublisher serviceEndpointPublisher;
+
+ public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+ {
+ this.serviceEndpointPublisher = serviceEndpointPublisher;
+ }
+
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement info");
+
+ URL warURL = udi.webappURL;
+
+ log.debug("publishServiceEndpoint: " + warURL);
+ try
+ {
+ DeploymentInfo di = udi.getAttachment(DeploymentInfo.class);
+ if (di == null)
+ throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
+
+ serviceEndpointPublisher.rewriteWebXml(udi);
+
+ // Preserve the repository config
+ DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
+ auxdi.repositoryConfig = di.getTopRepositoryConfig();
+ getMainDeployer().deploy(auxdi);
+ }
+ catch (Exception ex)
+ {
+ WSDeploymentException.rethrow(ex);
+ }
+ }
+
+ public void destroy(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement info");
+
+ URL warURL = udi.webappURL;
+ if (warURL == null)
+ {
+ log.error("Cannot obtain warURL for: " + udi.name);
+ return;
+ }
+
+ log.debug("destroyServiceEndpoint: " + warURL);
+ try
+ {
+ getMainDeployer().undeploy(warURL);
+ }
+ catch (Exception ex)
+ {
+ WSDeploymentException.rethrow(ex);
+ }
+ }
+
+ public void start(Deployment dep)
+ {
+ }
+
+ public void stop(Deployment dep)
+ {
+ }
+
+ private MainDeployerMBean getMainDeployer() throws MBeanProxyCreationException
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ MainDeployerMBean mainDeployer = (MainDeployerMBean)MBeanProxy.get(MainDeployerMBean.class, MainDeployerMBean.OBJECT_NAME, server);
+ return mainDeployer;
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppDeployerDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,61 @@
+/*
+ * 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.jboss42.jbossws;
+
+//$Id$
+
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.deployment.AbstractDeployer;
+import org.jboss.ws.integration.deployment.Deployment;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+
+/**
+ * A deployer that generates a webapp for an EJB endpoint
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class WebAppGeneratorDeployer extends AbstractDeployer
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ if (udi == null)
+ throw new IllegalStateException("Cannot obtain unified deployement info");
+
+ UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
+ if (umd == null)
+ throw new IllegalStateException("Cannot obtain unified meta data");
+
+ if (dep.getType().toString().endsWith("EJB21"))
+ {
+ ServiceEndpointGeneratorEJB21 generator = new ServiceEndpointGeneratorEJB21();
+ udi.webappURL = generator.generatWebDeployment(umd, udi);
+ }
+ else if (dep.getType().toString().endsWith("EJB3"))
+ {
+ ServiceEndpointGeneratorEJB3 generator = new ServiceEndpointGeneratorEJB3();
+ udi.webappURL = generator.generatWebDeployment(umd, udi);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebAppGeneratorDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,122 @@
+/*
+ * 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.jboss42.jbossws;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.ws.core.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
+import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 05-May-2006
+ */
+public class WebMetaDataAdapter
+{
+ public UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, WebMetaData webMetaData)
+ {
+ udi.addAttachment(WebMetaData.class, webMetaData);
+
+ UnifiedWebMetaData umd = new UnifiedWebMetaData();
+ umd.setContextRoot(webMetaData.getContextRoot());
+ umd.setServletMappings(webMetaData.getServletMappings());
+ umd.setServletClassNames(getServletClassMap(webMetaData));
+ umd.setConfigName(webMetaData.getConfigName());
+ umd.setConfigFile(webMetaData.getConfigFile());
+ umd.setSecurityDomain(webMetaData.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(webMetaData));
+ umd.setSecurityMetaData(getSecurityMetaData(webMetaData.getSecurityContraints()));
+
+ return umd;
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return wmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ private List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
+ {
+ ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new ArrayList<UnifiedWebSecurityMetaData>();
+
+ while (securityConstraints.hasNext())
+ {
+ WebSecurityMetaData securityMetaData = (WebSecurityMetaData)securityConstraints.next();
+
+ UnifiedWebSecurityMetaData current = new UnifiedWebSecurityMetaData();
+ unifiedsecurityMetaData.add(current);
+
+ current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+ HashMap resources = securityMetaData.getWebResources();
+ for (Object webResourceObj : resources.values())
+ {
+ WebResourceCollection webResource = (WebResourceCollection)webResourceObj;
+ UnifiedWebResourceCollection currentResource = current.addWebResource(webResource.getName());
+ for (String currentPattern : webResource.getUrlPatterns())
+ {
+ currentResource.addPattern(currentPattern);
+ }
+ }
+
+ }
+
+ return unifiedsecurityMetaData;
+ }
+
+ private Map<String, String> getServletClassMap(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClass = (String)entry.getValue();
+ // Skip JSPs
+ if (servletClass != null)
+ mappings.put(servletName, servletClass);
+ }
+ return mappings;
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/WebMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,149 @@
+/*
+ * 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.jboss42.jms;
+
+// $Id:JMSMessageDispatcher.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
+import org.jboss.ws.core.server.legacy.ServiceEndpoint;
+import org.jboss.ws.core.server.legacy.ServiceEndpointInvoker;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManager;
+import org.jboss.ws.core.server.legacy.ServiceEndpointManagerFactory;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
+
+/**
+ * A dispatcher for SOAPMessages
+ *
+ * @author Thomas.Diesler at jboss.org
+ */
+public class JMSMessageDispatcher implements JMSMessageDispatcherMBean
+{
+ // logging support
+ protected Logger log = Logger.getLogger(JMSMessageDispatcher.class);
+
+ /** Dispatch the message to the underlying SOAP engine
+ */
+ public SOAPMessage dipatchMessage(String fromName, Object targetBean, InputStream reqMessage) throws RemoteException
+ {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+ ObjectName sepID = getServiceEndpointForDestination(epManager, fromName);
+
+ if (sepID == null)
+ throw new WSException("Cannot find serviceID for: " + fromName);
+
+ log.debug("dipatchMessage: " + sepID);
+
+ // Setup the MDB invoker
+ ServiceEndpoint sep = epManager.getServiceEndpointByID(sepID);
+ ServerEndpointMetaData sepMetaData = sep.getServiceEndpointInfo().getServerEndpointMetaData();
+
+ ServiceEndpointInvoker invoker = sep.getServiceEndpointInfo().getInvoker();
+ if (invoker instanceof ServiceEndpointInvokerMDB)
+ {
+ ServiceEndpointInvokerMDB mdbInvoker = (ServiceEndpointInvokerMDB)invoker;
+ mdbInvoker.setTargetBeanObject(targetBean);
+ }
+
+ // Associate a message context with the current thread
+ CommonMessageContext msgContext = new SOAPMessageContextJAXRPC();
+ MessageContextAssociation.pushMessageContext(msgContext);
+ msgContext.setEndpointMetaData(sepMetaData);
+
+ SOAPMessage resMessage = null;
+ try
+ {
+ // Process the request message and return the already serialized response
+ // Legacy implementations of the JMSTransportSupport dont provide a msg
+ // context which is needed for serialization.
+ resMessage = (SOAPMessage)sep.processRequest(null, null, reqMessage);
+ resMessage.writeTo(new ByteArrayOutputStream());
+ return resMessage;
+ }
+ catch (Exception ex)
+ {
+ WSException.rethrow("Cannot process SOAP request", ex);
+ }
+ finally
+ {
+ MessageContextAssociation.popMessageContext();
+ }
+
+ return resMessage;
+ }
+
+ /** Dispatch the message to the underlying SOAP engine
+ */
+ public SOAPMessage delegateMessage(String serviceID, InputStream soapMessage) throws RemoteException
+ {
+ throw new NotImplementedException();
+ }
+
+ // The destination jndiName is encoded in the service object name under key 'jms'
+ private ObjectName getServiceEndpointForDestination(ServiceEndpointManager epManager, String fromName)
+ {
+ ObjectName sepID = null;
+ for (ObjectName aux : epManager.getServiceEndpoints())
+ {
+ String jmsProp = aux.getKeyProperty("jms");
+ if (jmsProp != null && jmsProp.equals(fromName))
+ {
+ sepID = aux;
+ break;
+ }
+ }
+ return sepID;
+ }
+
+ public void create() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ {
+ server.registerMBean(this, OBJECT_NAME);
+ }
+ }
+
+ public void destroy() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ if (server != null)
+ {
+ server.unregisterMBean(OBJECT_NAME);
+ }
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcher.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,28 @@
+/*
+ * 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.jboss42.jms;
+
+// $Id:JMSMessageDispatcher.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+public interface JMSMessageDispatcherMBean extends MessageDispatcher
+{
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSMessageDispatcherMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,241 @@
+/*
+ * 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.jboss42.jms;
+
+// $Id:JMSTransportSupport.java 915 2006-09-08 08:40:45Z thomas.diesler at jboss.com $
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.ejb.EJBException;
+import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
+import javax.jms.BytesMessage;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NestedRuntimeException;
+
+/**
+ * The abstract base class for MDBs that want to act as web service endpoints.
+ * A subclass should only need to implement the service endpoint interface.
+ *
+ * @author Thomas.Diesler at jboss.org
+ */
+public abstract class JMSTransportSupport implements MessageDrivenBean, MessageListener
+{
+ // logging support
+ protected Logger log = Logger.getLogger(JMSTransportSupport.class);
+
+ //private MessageDrivenContext mdbCtx;
+ private QueueConnectionFactory queueFactory;
+
+ /**
+ * All messages come in here, if it is a BytesMessage we pass it on for further processing.
+ */
+ public void onMessage(Message message)
+ {
+ try
+ {
+ String msgStr = null;
+ if (message instanceof BytesMessage)
+ {
+ msgStr = getMessageStr((BytesMessage)message);
+ }
+ else if (message instanceof TextMessage)
+ {
+ msgStr = ((TextMessage)message).getText();
+ }
+ else
+ {
+ log.warn("Invalid message type: " + message);
+ return;
+ }
+
+ log.debug("Incomming SOAP message: " + msgStr);
+
+ String fromName = null;
+ Destination destination = message.getJMSDestination();
+ if (destination instanceof Queue)
+ fromName = "queue/" + ((Queue)destination).getQueueName();
+ if (destination instanceof Topic)
+ fromName = "topic/" + ((Topic)destination).getTopicName();
+
+ InputStream reqMessage = new ByteArrayInputStream(msgStr.getBytes());
+ SOAPMessage resMessage = processSOAPMessage(fromName, reqMessage);
+
+ if (resMessage != null)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ resMessage.writeTo(baos);
+
+ msgStr = new String(baos.toByteArray());
+ log.debug("Outgoing SOAP message: " + msgStr);
+
+ Queue replyQueue = getReplyQueue(message);
+ if (replyQueue != null)
+ {
+ sendResponse(replyQueue, msgStr);
+ }
+ else
+ {
+ log.warn("No reply queue, ignore response message");
+ }
+ }
+ else
+ {
+ log.debug("SOAP response message is null");
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new EJBException(e);
+ }
+ }
+
+ protected SOAPMessage processSOAPMessage(String fromName, InputStream reqMessage) throws SOAPException, IOException, RemoteException
+ {
+ MessageDispatcher msgDispatcher = new JMSMessageDispatcher();
+ SOAPMessage resMessage = msgDispatcher.dipatchMessage(fromName, this, reqMessage);
+ return resMessage;
+ }
+
+ private String getMessageStr(BytesMessage message) throws Exception
+ {
+ byte[] buffer = new byte[8 * 1024];
+ ByteArrayOutputStream out = new ByteArrayOutputStream(buffer.length);
+ int read = message.readBytes(buffer);
+ while (read != -1)
+ {
+ out.write(buffer, 0, read);
+ read = message.readBytes(buffer);
+ }
+
+ byte[] msgBytes = out.toByteArray();
+ return new String(msgBytes);
+ }
+
+ /**
+ * Get the reply queue.
+ */
+ protected Queue getReplyQueue(Message message) throws JMSException
+ {
+ Queue replyQueue = (Queue)message.getJMSReplyTo();
+ return replyQueue;
+ }
+
+ /**
+ * Respond to the call by sending a message to the reply queue
+ */
+ protected void sendResponse(Queue replyQueue, String msgStr) throws SOAPException, IOException, JMSException
+ {
+ QueueConnection qc = queueFactory.createQueueConnection();
+ QueueSession session = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ QueueSender sender = null;
+ try
+ {
+ sender = session.createSender(replyQueue);
+ TextMessage responseMessage = session.createTextMessage(msgStr);
+ sender.send(responseMessage);
+ log.info("Sent response");
+ }
+ finally
+ {
+ try
+ {
+ sender.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ try
+ {
+ session.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ try
+ {
+ qc.close();
+ }
+ catch (JMSException ignored)
+ {
+ }
+ }
+ }
+
+ // MDB lifecycle methods ********************************************************************************************
+
+ public void ejbCreate()
+ {
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ queueFactory = (QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new NestedRuntimeException(e);
+ }
+ }
+
+ /**
+ * A container invokes this method before it ends the life of the message-driven object.
+ */
+ public void ejbRemove() throws EJBException
+ {
+ }
+
+ /**
+ * Set the associated message-driven context.
+ */
+ public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
+ {
+ //this.mdbCtx = ctx;
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/JMSTransportSupport.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,51 @@
+/*
+ * 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.jboss42.jms;
+
+// $Id:MessageDispatcher.java 898 2006-09-05 08:23:03Z thomas.diesler at jboss.com $
+
+import java.io.InputStream;
+import java.rmi.RemoteException;
+
+import javax.management.ObjectName;
+import javax.xml.soap.SOAPMessage;
+
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * A dispatcher for SOAPMessages
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 19-Feb-2006
+ */
+public interface MessageDispatcher
+{
+ public static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=JMSTransportSupport");
+
+ /** Dispatch the message to the underlying SOAP engine
+ */
+ SOAPMessage dipatchMessage(String fromName, Object targetImplBean, InputStream reqMessage) throws RemoteException;
+
+ /** Dispatch the message to the underlying SOAP engine
+ */
+ SOAPMessage delegateMessage(String serviceID, InputStream reqMessage) throws RemoteException;
+}
\ No newline at end of file
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/MessageDispatcher.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,94 @@
+/*
+ * 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.jboss42.jms;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.server.legacy.AbstractServiceEndpointInvoker;
+import org.jboss.ws.core.server.legacy.ServiceEndpointInvoker;
+import org.jboss.ws.core.utils.ThreadLocalAssociation;
+
+/**
+ * Handles invocations on MDB endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 21-Mar-2006
+ */
+public class ServiceEndpointInvokerMDB extends AbstractServiceEndpointInvoker implements ServiceEndpointInvoker
+{
+ // provide logging
+ private Logger log = Logger.getLogger(ServiceEndpointInvokerMDB.class);
+
+ /** Load the SEI implementation bean if necessary
+ */
+ public Class loadServiceEndpoint() throws ClassNotFoundException
+ {
+ return null;
+ }
+
+ // The dispatcher sets the target bean object
+ public void setTargetBeanObject(Object targetMDB)
+ {
+ ThreadLocalAssociation.localInvokerMDBAssoc().set(targetMDB);
+ }
+
+ /** Create an instance of the SEI implementation bean if necessary
+ */
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass) throws InstantiationException, IllegalAccessException
+ {
+ return ThreadLocalAssociation.localInvokerMDBAssoc().get();
+ }
+
+ /** Invoke an instance of the SEI implementation bean */
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
+ {
+ log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+ try
+ {
+ Class implClass = seiImpl.getClass();
+ Method seiMethod = epInv.getJavaMethod();
+ Method implMethod = getImplMethod(implClass, seiMethod);
+
+ Object[] args = epInv.getRequestPayload();
+ Object retObj = implMethod.invoke(seiImpl, args);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ finally
+ {
+ // cleanup thread local
+ setTargetBeanObject(null);
+ }
+ }
+
+ /** Destroy an instance of the SEI implementation bean if necessary */
+ public void destroyServiceEndpointInstance(Object seiImpl)
+ {
+ }
+}
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jms/ServiceEndpointInvokerMDB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.core.server.HttpServer 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss42.JBossHttpServer
\ No newline at end of file
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws-jboss42.jar/META-INF/services/org.jboss.ws.extensions.security.SecurityAssociationAdaptorFactory 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1 @@
+org.jboss.ws.integration.jboss42.SecurityAssociationAdaptorFactoryImpl
\ No newline at end of file
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer">
+
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig" class="org.jboss.ws.integration.management.ServerConfigImpl">
+ <!--
+ The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+ element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+
+ If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
+ If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+
+ If 'webServiceHost' is not set, JBossWS uses requesters protocol host and port when rewriting the <soap:address>.
+ -->
+ <property name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry" class="org.jboss.ws.core.server.ServiceEndpointRegistry"/>
+
+ <!-- A subscription manager for WS-Eventing -->
+ <bean name="WSSubscriptionManager" class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
+
+ <!-- Bind Service objects in client environment context -->
+ <!-- The bean name is compiled into the server. Changeit with the next release. -->
+ <bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
+
+ <!--
+ *********************************************************************************************************************
+ Web Service deployment
+
+ There are three deployer interceptors registered with the JBoss Deployers.
+
+ 1) DeployerInterceptorJSE
+ 2) DeployerInterceptorEJB21
+ 3) DeployerInterceptorEJB3
+
+ Each interceptor has a number of DeployerHooks registerd with it
+
+ Conceptually, each of these hooks implements the following pattern:
+
+ DployerHook.deploy(unit)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeployerManager.deploy(dep)
+
+ DeployerHook.undeploy(unit)
+ Deployment dep = getDeployment(unit)
+ DeployerManager.undeploy(dep)
+
+ Each deployer hook has a web service DeployerManager injected into it.
+ A web service DeployerManager maintains a list of Deployers, each of which
+ handles a single aspect of web service deployment.
+
+ Finally, each Endpoint is registered with the EndpointRegistry.
+
+ *********************************************************************************************************************
+ -->
+
+ <!--
+ Each DeploymentManger maintains a list of Deployers
+ Each Deployer handles a single aspect of web service deployment.
+ -->
+ <bean name="WSDeployerManagerJSE" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+ <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+ <inject bean="WSUnifiedMetaDataDeployer"/>
+ <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+ <inject bean="WSModifyWebMetaDataDeployer"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSDeployerManagerEJB" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+ <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+ <inject bean="WSUnifiedMetaDataDeployer"/>
+ <inject bean="WSUnifiedMetaDataAssociationDeployer"/>
+ <inject bean="WSWebAppGeneratorDeployer"/>
+ <inject bean="WSWebAppDeployerDeployer"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSMainDeployerManager" class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.ws.integration.deployment.Deployer">
+ <inject bean="WSEndpointNameDeployer"/>
+ <inject bean="WSEndpointHandlerDeployer"/>
+ <inject bean="WSPublishContractDeployer"/>
+ <inject bean="WSClassLoaderInjectionDeployer"/>
+ <inject bean="WSEagerInitializeDeployer"/>
+ <inject bean="WSEndpointRegistryDeployer"/>
+ <inject bean="WSEndpointLifecycleDeployer"/>
+ </list>
+ </property>
+ </bean>
+
+ <!--
+ The Deployers
+ Each handles a single aspect of web service deployment
+ -->
+ <bean name="WSClassLoaderInjectionDeployer" class="org.jboss.ws.integration.jboss42.jbossws.ClassLoaderInjectionDeployer"/>
+ <bean name="WSEagerInitializeDeployer" class="org.jboss.ws.core.deployment.EagerInitializeDeployer"/>
+ <bean name="WSEndpointHandlerDeployer" class="org.jboss.ws.core.deployment.EndpointHandlerDeployer">
+ <property name="requestHandler">org.jboss.ws.core.server.RequestHandlerImpl</property>
+ <property name="lifecycleHandler">org.jboss.ws.core.server.LifecycleHandlerImpl</property>
+ <property name="invocationHandler">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>JAXRPC_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+ <entry><key>JAXRPC_EJB21</key><value>org.jboss.ws.integration.jboss42.jbossws.InvocationHandlerEJB21</value></entry>
+ <entry><key>JAXWS_JSE</key><value>org.jboss.ws.core.server.InvocationHandlerJSE</value></entry>
+ <entry><key>JAXWS_EJB3</key><value>org.jboss.ws.integration.jboss42.jbossws.InvocationHandlerEJB3</value></entry>
+ </map>
+ </property>
+ </bean>
+ <bean name="WSEndpointLifecycleDeployer" class="org.jboss.ws.core.deployment.EndpointLifecycleDeployer"/>
+ <bean name="WSEndpointNameDeployer" class="org.jboss.ws.core.deployment.EndpointNameDeployer"/>
+ <bean name="WSEndpointRegistryDeployer" class="org.jboss.ws.integration.deployment.EndpointRegistryDeployer"/>
+ <bean name="WSModifyWebMetaDataDeployer" class="org.jboss.ws.integration.jboss42.jbossws.ModifyWebMetaDataDeployer">
+ <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ </bean>
+ <bean name="WSPublishContractDeployer" class="org.jboss.ws.core.deployment.PublishContractDeployer"/>
+ <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.ws.integration.jboss42.jbossws.UnifiedDeploymentInfoDeployer">
+ <property name="deploymentInfoAdapter"><inject bean="WSDeploymentInfoAdapter"/></property>
+ </bean>
+ <bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataAssociationDeployer"/>
+ <bean name="WSUnifiedMetaDataDeployer" class="org.jboss.ws.core.deployment.UnifiedMetaDataDeployer"/>
+ <bean name="WSWebAppGeneratorDeployer" class="org.jboss.ws.integration.jboss42.jbossws.WebAppGeneratorDeployer"/>
+ <bean name="WSWebAppDeployerDeployer" class="org.jboss.ws.integration.jboss42.jbossws.WebAppDeployerDeployer">
+ <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ </bean>
+
+ <!-- Deployer helper beans -->
+ <bean name="WSServiceEndpointPublisher" class="org.jboss.ws.core.deployment.ServiceEndpointPublisher">
+ <property name="servletClass">org.jboss.ws.core.server.ServiceEndpointServlet</property>
+ </bean>
+ <bean name="WSDeploymentInfoAdapter" class="org.jboss.ws.integration.jboss42.jbossws.DeploymentInfoAdapter">
+ <property name="appMetaDataAdapter"><inject bean="WSAppMetaDataAdapter"/></property>
+ <property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
+ </bean>
+ <bean name="WSAppMetaDataAdapter" class="org.jboss.ws.integration.jboss42.jbossws.ApplicationMetaDataAdapter"/>
+ <bean name="WSWebMetaDataAdapter" class="org.jboss.ws.integration.jboss42.jbossws.WebMetaDataAdapter"/>
+
+ <!--
+ Register DeployerHooks with JBoss deployers
+ -->
+ <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.ws.integration.jboss42.jbossws.JAXRPCDeployerHookJSE">
+ <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+ <property name="phaseOneInterceptors">
+ <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+ <value>jboss.ws:service=DeployerInterceptorJSE</value>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.ws.integration.jboss42.jbossws.JAXRPCDeployerHookEJB21">
+ <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+ <property name="phaseOneInterceptors">
+ <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+ <value>jboss.ws:service=DeployerInterceptorEJB21</value>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.ws.integration.jboss42.jbossws.JAXWSDeployerHookJSE">
+ <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+ <property name="phaseOneInterceptors">
+ <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+ <value>jboss.ws:service=DeployerInterceptorJSE</value>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.ws.integration.jboss42.jbossws.JAXWSDeployerHookEJB3">
+ <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+ <property name="phaseOneInterceptors">
+ <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+ <value>jboss.ws:service=DeployerInterceptorEJB3</value>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSMainDeployerHook" class="org.jboss.ws.integration.jboss42.jbossws.MainDeployerHook">
+ <property name="deployerManager"><inject bean="WSMainDeployerManager"/></property>
+ <property name="phaseTwoInterceptors">
+ <list class="java.util.LinkedList" elementClass="javax.management.ObjectName">
+ <value>jboss.ws:service=DeployerInterceptorJSE</value>
+ <value>jboss.ws:service=DeployerInterceptorEJB21</value>
+ <value>jboss.ws:service=DeployerInterceptorEJB3</value>
+ </list>
+ </property>
+ </bean>
+
+</deployment>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id$ -->
+
+<server>
+
+ <!--
+ A deployer service for JSE endpoints.
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorJSE" code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.web:service=WebServer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!--
+ A deployer service for EJB2.1 endpoints.
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB21" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB21">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.ejb:service=EJBDeployer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+ <!--
+ A deployer service for EJB3 endpoints.
+ -->
+ <mbean name="jboss.ws:service=DeployerInterceptorEJB3" code="org.jboss.ws.integration.jboss42.DeployerInterceptorEJB3">
+ <depends-list optional-attribute-name="Interceptables">
+ <depends-list-element>jboss.ejb3:service=EJB3Deployer</depends-list-element>
+ </depends-list>
+ </mbean>
+
+</server>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+ PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+ <!--
+ <security-domain>java:/jaas/jbossws</security-domain>
+ -->
+ <context-root>jbossws</context-root>
+
+</jboss-web>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ A web application that installs the JBossWS servlets
+
+ $Id$
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>JBossWS</display-name>
+
+ <servlet>
+ <servlet-name>ContextServlet</servlet-name>
+ <servlet-class>org.jboss.ws.integration.jboss42.JBossContextServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+ <servlet-class>org.jboss.ws.integration.jboss42.PortComponentLinkServlet</servlet-class>
+ </servlet>
+
+ <!-- now the mappings -->
+
+ <servlet-mapping>
+ <servlet-name>ContextServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+ <url-pattern>/pclink</url-pattern>
+ </servlet-mapping>
+
+ <!--
+ currently the W3C haven't settled on a media type for WSDL;
+ http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response
+ -->
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Property changes on: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/index.html 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,63 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<title>JBossWS / jbossws-2.0.0.CR3 (date=200702012001)</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>Welcome to JBoss Web Services</div>
+
+<div class="pageSection">
+<h2>J2EE compatible web services</h2>
+JBossWS is a JAX-WS compliant web service stack developed to be part of JBoss' JavaEE5 offering.
+</div>
+
+<div class="pageSection">
+<h3>Administration</h3>
+
+<fieldset>
+ <legend><b>Runtime information</b></legend>
+<ul>
+ <li><a href="services">View a list of deployed services</a></li>
+ <!--li><a href="depends">View installed dependencies</a></li-->
+ <li><a href="/jmx-console/">Access JMX console</a></li>
+</ul>
+</fieldset>
+</div>
+
+<div class="pageSection">
+<h3>Project information</h3>
+
+<fieldset>
+ <legend><b>Documentation</b></legend>
+
+<ul>
+ <li><a href="http://labs.jboss.com/portal/jbossws/downloads">Latest download and samples</a></li>
+ <li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBWSFAQ">FAQ</a></li>
+ <li><a href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html">User guide</a></li>
+ <li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS">JBossWS WIKI</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Community</b></legend>
+<ul>
+ <li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=200">User forum</a></li>
+ <li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=174">Design forum</a></li>
+ <li><a href="https://lists.jboss.org/mailman/listinfo/jbossws-users">Mailing list</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Source repository</b></legend>
+<ul>
+ <li><a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQSourceRepository">Subversion repository</a></li>
+ <li><a href="http://fisheye.jboss.com/viewrep/JBossWS">Browse sources online</a></li>
+</ul>
+</fieldset>
+</div>
+
+</body>
+</html>
Added: projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.war/styles.css 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+ font-size: 14pt;
+ font-weight: BOLD;
+ color: #ffffff;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-color:#000066;
+ margin-bottom:15px;
+ padding-left:15px;
+ padding-top:5px;
+ padding-bottom:5px;
+ background-color: #aaaadd;
+ max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{
+ font-size: 6pt;
+ background-color: #dddddd;
+ width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ font-weight: 600;
+ text-align: center;
+ background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+ font-family: Verdana, sans-serif;
+ font-weight: 500;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+ background-color: #dddddd;
+}
+
+/* error message */
+.error {
+ font-family: Courier New;
+ color: #990000;
+}
+
+/* error message */
+.error_trace {
+ font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+ font-weight: bold;
+}
+
+body {
+ font-family: Verdana,, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+ font-family: Verdana, sans-serif;
+ font-size: 14pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h2 {
+ font-family: Verdana, sans-serif;
+ font-size: 12pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h3 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h4 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 500;
+ color: #000066;
+}
+
+/* table desk */
+td {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+input, textarea, select, option {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+}
+
+a {
+ font-family: Verdana, sans-serif;
+ color: #0000dd;
+ text-decoration: none;
+}
+
+a:hover{
+ font-family: Verdana, sans-serif;
+ color: #cc0000;
+ text-decoration: none;
+}
+
+pre {
+ background:#dddddd
+}
\ No newline at end of file
Added: projects/wsintegration/jbws-jboss42/trunk/version.properties
===================================================================
--- projects/wsintegration/jbws-jboss42/trunk/version.properties (rev 0)
+++ projects/wsintegration/jbws-jboss42/trunk/version.properties 2007-05-09 03:36:06 UTC (rev 62930)
@@ -0,0 +1,32 @@
+
+# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler at jboss.com $
+
+specification.title=JBossWS
+specification.vendor=JBoss (http://www.jboss.org)
+specification.version=jbossws-2.1
+
+version.id=2.1.0.DEV
+repository.id=SNAPSHOT
+
+implementation.title=JBoss Web Services (JBossWS)
+implementation.url=http://www.jboss.org/products/jbossws
+implementation.vendor=JBoss Inc.
+implementation.vendor.id=http://www.jboss.org
+
+# Thirdparty library versions
+apache-xmlsec=1.3.0
+ibm-wsdl4j=1.6.2
+jboss-common-core=2.0.2.GA
+jboss-common-logging-log4j=2.0.2.GA
+jboss-common-logging-spi=2.0.2.GA
+jboss-jaxr=1.2.0.GA
+jboss-jbossws=SNAPSHOT
+jboss-jbossws-spi=SNAPSHOT
+jboss-jbossxb=1.0.0.CR10
+jboss-microcontainer=1.0.2
+jbossws-wsconsume-impl=2.0.0
+stax-api=1.0
+sun-jaxb=2.0.3jboss
+sun-servlet=2.4
+wscommons-policy=1.0
+
Modified: projects/wsintegration/jbws-jboss50/trunk/ant.properties.example
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/ant.properties.example 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/ant.properties.example 2007-05-09 03:36:06 UTC (rev 62930)
@@ -6,9 +6,6 @@
# JBoss Home
#jboss50.home=/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta3
-# The JBoss server under test. This can be [jboss50|jboss42|jboss40|tomcat]
-jbossws.integration.target=jboss50
-
# The JBoss server instance
jboss.server.instance=default
Modified: projects/wsintegration/jbws-jboss50/trunk/build.xml
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/build.xml 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/build.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -40,7 +40,7 @@
<property name="jboss50.resources.dir" value="${jboss50.src.dir}/resources"/>
<property name="jboss50.output.dir" value="${jboss50.dir}/output"/>
<property name="jboss50.output.classes.dir" value="${jboss50.output.dir}/classes"/>
- <property name="jboss50.output.classes14.dir" value="${jboss50.output.dir}/classes14"/>
+ <property name="jboss50.output.etc.dir" value="${jboss50.output.dir}/etc"/>
<property name="jboss50.output.lib.dir" value="${jboss50.output.dir}/lib"/>
<property name="thirdparty.dir" value="${basedir}/thirdparty"/>
@@ -104,6 +104,20 @@
<!-- Compile etc files (manifests and such) -->
<target name="jboss50-compile-etc" depends="jboss50-init">
+ <mkdir dir="${jboss50.output.etc.dir}"/>
+ <copy todir="${jboss50.output.etc.dir}" filtering="yes" overwrite="yes">
+ <fileset dir="${jboss50.etc.dir}">
+ <include name="component-info.xml"/>
+ <include name="default.mf"/>
+ </fileset>
+ <filterset>
+ <filter token="java.vm.version" value="${java.vm.version}"/>
+ <filter token="java.vm.vendor" value="${java.vm.vendor}"/>
+ <filter token="build.id" value="${build.id}"/>
+ <filter token="implementation.version" value="jbossws-${version.id}"/>
+ <filtersfile file="${basedir}/version.properties"/>
+ </filterset>
+ </copy>
</target>
<!-- ================================================================== -->
@@ -183,28 +197,6 @@
</target>
<!-- ================================================================== -->
- <!-- Deployment -->
- <!-- ================================================================== -->
-
- <!-- Deploy jbossws to jboss50 -->
- <target name="deploy-jboss50" depends="jboss50-jars" description="Deploy to jboss50">
- <ant antfile="${jboss50.etc.dir}/ant-import/build-deploy.xml" target="deploy-jboss50" inheritall="true"/>
- <!-- The JBossAS testsuite references jbossws from thirdparty -->
- <copy todir="${jboss50.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
- <fileset dir="${thirdparty.dir}">
- <include name="jboss-jaxrpc.jar"/>
- <include name="jboss-jaxws.jar"/>
- <include name="jboss-saaj.jar"/>
- <include name="jbossws-client.jar"/>
- <include name="jbossws-core.jar"/>
- </fileset>
- <fileset dir="${jboss50.output.lib.dir}">
- <include name="jbossws-jboss50-integration.jar"/>
- </fileset>
- </copy>
- </target>
-
- <!-- ================================================================== -->
<!-- Miscellaneous -->
<!-- ================================================================== -->
Modified: projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-deploy.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -18,7 +18,7 @@
<!-- ================================================================== -->
<!-- Deploy jbossws to jboss50 -->
- <target name="deploy-jboss50" depends="" description="Deploy jbossws">
+ <target name="deploy-jboss50" depends="jboss50-jars" description="Deploy jbossws">
<fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
@@ -54,10 +54,6 @@
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss50.output.lib.dir}/jbossws50.sar"/>
- <!-- Deploy juddi-service.sar -->
- <delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip dest="${jboss50.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="${thirdparty.dir}/juddi-service.sar"/>
</target>
</project>
Modified: projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/src/main/etc/ant-import/build-release.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -18,17 +18,19 @@
description="Release to jboss.local.repository">
<!-- jboss/jbossws-jboss50 -->
+ <property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
<mkdir dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
<copy todir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib" overwrite="true">
<fileset dir="${jboss50.output.lib.dir}">
+ <include name="jbossws-jboss50.jar"/>
<include name="jbossws50.sar"/>
<include name="jbossws50-deployer.zip"/>
<include name="jbossws50-src.zip"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml" file="${build.etc.dir}/component-info/jbossws-jboss50.xml" filtering="true" overwrite="true">
+ <copy tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml" file="${jboss50.etc.dir}/component-info.xml" filtering="true" overwrite="true">
<filterset>
- <filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${basedir}/version.properties"/>
</filterset>
</copy>
Modified: projects/wsintegration/jbws-jboss50/trunk/src/main/etc/component-info.xml
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/src/main/etc/component-info.xml 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/src/main/etc/component-info.xml 2007-05-09 03:36:06 UTC (rev 62930)
@@ -5,6 +5,7 @@
version="@repository.id@"
licenseType="lgpl">
+ <artifact id="jbossws-jboss50.jar"/>
<artifact id="jbossws50.sar"/>
<artifact id="jbossws50-deployer.zip"/>
<artifact id="jbossws50-src.zip"/>
Modified: projects/wsintegration/jbws-jboss50/trunk/version.properties
===================================================================
--- projects/wsintegration/jbws-jboss50/trunk/version.properties 2007-05-09 03:12:04 UTC (rev 62929)
+++ projects/wsintegration/jbws-jboss50/trunk/version.properties 2007-05-09 03:36:06 UTC (rev 62930)
@@ -1,7 +1,7 @@
# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler at jboss.com $
-specification.title=JBossWS-SPI
+specification.title=JBossWS
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.1
More information about the jboss-cvs-commits
mailing list