Author: thomas.diesler(a)jboss.com
Date: 2007-03-12 06:11:14 -0400 (Mon, 12 Mar 2007)
New Revision: 2598
Added:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdapter.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapterFactory.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/AbstractApplicationMetaDataAdapter.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapterFactory.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
trunk/jbossws-core/src/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
Removed:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdaptor.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21MBean.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3MBean.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSE.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSEMBean.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSE.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSEMBean.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeploymentInfoAdaptor.java
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/URLLoaderAdapter.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ResourceLoaderAdapter.java
Modified:
trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-4.2/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-5.0/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0.5/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.2/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-5.0/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Samples-TC-5.5/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0-jdk14/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5-jdk14/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.2/config.xml
trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml
trunk/integration-jboss40/.classpath
trunk/integration-jboss40/build.xml
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration-jboss42/build.xml
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
trunk/integration-tomcat/src/resources/jbossws.war/META-INF/jboss-beans.xml
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
trunk/jbossws-tests/src/resources/jaxrpc/jbws425/META-INF/application-client.xml
Log:
Merge integration layers from 1.2.0.SP1
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-4.2/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-4.2/config.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-4.2/config.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -33,7 +33,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-5.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-5.0/config.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Local-Tests-AS-5.0/config.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -33,7 +33,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -45,7 +45,7 @@
#
cd $SVNBASEDIR/build/output/jbossws-samples-(a)version.id@
cp ant.properties.example ant.properties
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0.5/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0.5/config.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.0.5/config.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -45,7 +45,7 @@
#
cd $SVNBASEDIR/build/output/jbossws-samples-(a)version.id@
cp ant.properties.example ant.properties
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.2/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.2/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-4.2/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -45,7 +45,7 @@
#
cd $SVNBASEDIR/build/output/jbossws-samples-(a)version.id@
cp ant.properties.example ant.properties
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-5.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-5.0/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Samples-AS-5.0/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -45,7 +45,7 @@
#
cd $SVNBASEDIR/build/output/jbossws-samples-(a)version.id@
cp ant.properties.example ant.properties
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Samples-TC-5.5/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Samples-TC-5.5/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Samples-TC-5.5/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -43,7 +43,7 @@
#
cd $SVNBASEDIR/build/output/jbossws-samples-(a)version.id@
cp ant.properties.example ant.properties
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -38,7 +38,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0-jdk14/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0-jdk14/config.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0-jdk14/config.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -40,7 +40,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -38,7 +38,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5-jdk14/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5-jdk14/config.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.0.5-jdk14/config.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -40,7 +40,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.2/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.2/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-4.2/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -38,7 +38,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml
===================================================================
--- trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/build/hudson/hudson-home/jobs/JBWS-Tests-AS-5.0/config.xml 2007-03-12 10:11:14
UTC (rev 2598)
@@ -38,7 +38,7 @@
# execute tests
#
cd $SVNBASEDIR/jbossws-tests
-ant $ENVIRONMENT tests 2>&1 | tee $WORKSPACE/tests.out
+ant $ENVIRONMENT clean tests 2>&1 | tee $WORKSPACE/tests.out
cat $WORKSPACE/tests.out | egrep FIXME\|FAILED | sort -u
#
Modified: trunk/integration-jboss40/.classpath
===================================================================
--- trunk/integration-jboss40/.classpath 2007-03-12 09:43:56 UTC (rev 2597)
+++ trunk/integration-jboss40/.classpath 2007-03-12 10:11:14 UTC (rev 2598)
@@ -3,6 +3,7 @@
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src"
path="/jbossws-core"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/integration-jboss42"/>
<classpathentry kind="lib" path="/build/thirdparty/ant.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/activation.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/commons-logging.jar"/>
@@ -30,6 +31,5 @@
<classpathentry kind="lib"
path="/build/thirdparty/mail.jar"/>
<classpathentry kind="lib"
path="/build/thirdparty/jboss-common.jar"
sourcepath="/build/thirdparty/jboss-common-sources.jar"/>
<classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/jboss-4.0.x"/>
- <classpathentry combineaccessrules="false" kind="src"
path="/integration-jboss42"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/integration-jboss40/build.xml
===================================================================
--- trunk/integration-jboss40/build.xml 2007-03-12 09:43:56 UTC (rev 2597)
+++ trunk/integration-jboss40/build.xml 2007-03-12 10:11:14 UTC (rev 2598)
@@ -57,12 +57,16 @@
<!-- Compile integration java sources -->
<target name="jboss40-compile-classes"
depends="jboss40-init,core-compile">
<mkdir dir="${jboss40.output.classes.dir}"/>
- <javac destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
+ <javac sourcepath="" destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
<src location="${jboss42.java.dir}"/>
<src location="${jboss40.java.dir}"/>
<include name="org/jboss/ws/integration/jboss40/**"/>
- <exclude
name="org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java"/>
+ <include name="org/jboss/ws/integration/jboss42/**"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/ServiceEndpointGeneratorEJB3.java"/>
+ <exclude
name="org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java"/>
<classpath refid="jboss40.integration.classpath"/>
<classpath path="${core.output.classes14.dir}"/>
<classpath path="${core.output.classes.dir}"/>
@@ -70,11 +74,13 @@
</target>
<target name="jboss40-compile-ejb3-classes"
depends="jboss40-init,core-compile,jboss40-check-ejb3-classes"
if="jboss40.ejb3.available">
<mkdir dir="${jboss40.output.classes.dir}"/>
- <javac destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
+ <javac sourcepath="" destdir="${jboss40.output.classes.dir}"
encoding="utf-8" debug="${javac.debug}"
verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}">
<src location="${jboss42.java.dir}"/>
<src location="${jboss40.java.dir}"/>
- <include
name="org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java"/>
+ <include
name="org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java"/>
+ <include
name="org/jboss/ws/integration/jboss42/ServiceEndpointGeneratorEJB3.java"/>
+ <include
name="org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java"/>
<classpath refid="jboss40.integration.classpath"/>
<classpath path="${core.output.classes14.dir}"/>
<classpath path="${core.output.classes.dir}"/>
@@ -180,7 +186,7 @@
<include name="wsdl4j.jar"/>
<include name="xmlsec.jar"/>
</fileset>
- <fileset dir="${jboss42.resources.dir}">
+ <fileset dir="${jboss40.resources.dir}">
<include name="jbossws.beans/META-INF/jboss-beans.xml"/>
</fileset>
<metainf dir="${core.resources.dir}/jbossws.sar/META-INF">
Added:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdapter.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdapter.java
(rev 0)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss40;
+
+// $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.integration.jboss42.AbstractApplicationMetaDataAdapter;
+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(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ApplicationMetaDataAdapter extends AbstractApplicationMetaDataAdapter
+{
+ @Override
+ 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:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ApplicationMetaDataAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $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.metadata.EjbPortComponentMetaData;
-import org.jboss.metadata.MessageDrivenMetaData;
-import org.jboss.metadata.SessionMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
-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;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ApplicationMetaDataAdaptor
-{
- public static UnifiedApplicationMetaData
buildUnifiedApplicationMetaData(ApplicationMetaData 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;
- }
-
- private static PublishLocationAdapter getPublishLocationAdpater(final
ApplicationMetaData apmd)
- {
- return new PublishLocationAdapter ()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return apmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- private static 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);
- }
-
- private static 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());
- ubmd.setPortComponent(upcmd);
- }
- }
- return ubmd;
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,212 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-//$Id$
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.deployment.SubDeployerInterceptorSupport;
-import org.jboss.ws.integration.KernelLocator;
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.mx.server.Invocation;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
-import org.jboss.ws.core.server.ServiceEndpointDeployer;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-
-/**
- * A deployer service that manages WS4EE compliant Web Services
- *
- * This service is called from the {@see org.jboss.ws.metadata.WebServiceInterceptor}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Dimitris.Andreadis(a)jboss.org
- * @since 15-Jan-2005
- */
-public abstract class DeployerInterceptor extends SubDeployerInterceptorSupport
-{
- // The main deployer
- private MainDeployerMBean mainDeployer;
-
- /** 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();
- }
-
- /** Overwrite to create the webservice
- */
- protected final Object create(Invocation invocation, DeploymentInfo di) throws
Throwable
- {
- Object retn = invokeNext(invocation);
- if (isWebserviceDeployment(di))
- {
- try
- {
- createServiceEndpoint(di);
- }
- catch (Exception ex)
- {
- destroyServiceEndpoint(di);
- DeploymentException.rethrowAsDeploymentException("Cannot create service
endpoint", ex);
- }
- }
- return retn;
- }
-
- /** Overwrite to start the webservice
- */
- protected final Object start(Invocation invocation, DeploymentInfo di) throws
Throwable
- {
- Object retn = invokeNext(invocation);
- try
- {
- startServiceEndpoint(di);
- }
- catch (Exception ex)
- {
- destroyServiceEndpoint(di);
- DeploymentException.rethrowAsDeploymentException("Cannot start service
endpoint", ex);
- }
- return retn;
- }
-
- /** Overwrite to stop the webservice
- */
- protected final Object stop(Invocation invocation, DeploymentInfo di) throws
Throwable
- {
- stopServiceEndpoint(di);
- return invokeNext(invocation);
- }
-
- /** Overwrite to destroy the webservice
- */
- protected final Object destroy(Invocation invocation, DeploymentInfo di) throws
Throwable
- {
- destroyServiceEndpoint(di);
- return invokeNext(invocation);
- }
-
- protected void createServiceEndpoint(DeploymentInfo di) throws Exception
- {
- log.debug("create: " + di.url);
- UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(di);
- di.context.put(UnifiedDeploymentInfo.class.getName(), udi);
- getServiceEndpointDeployer().create(udi);
- }
-
- protected void startServiceEndpoint(DeploymentInfo di) throws Exception
- {
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- log.debug("start: " + di.url);
-
- // late initialization of the web context loader
- if (di.metaData instanceof WebMetaData)
- {
- ClassLoader classLoader = ((WebMetaData)di.metaData).getContextLoader();
- udi.classLoader = classLoader;
- }
-
- getServiceEndpointDeployer().start(udi);
- }
- }
-
- protected void stopServiceEndpoint(DeploymentInfo di) throws Exception
- {
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- log.debug("stop: " + di.url);
- getServiceEndpointDeployer().stop(udi);
- }
- }
-
- protected void destroyServiceEndpoint(DeploymentInfo di) throws Exception
- {
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- log.debug("destroy: " + di.url);
- getServiceEndpointDeployer().destroy(udi);
- }
- }
-
- protected ServiceEndpointDeployer getServiceEndpointDeployer()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry = registry.getEntry(ServiceEndpointDeployer.BEAN_NAME);
- return (ServiceEndpointDeployer)entry.getTarget();
- }
-
- protected AbstractServiceEndpointPublisher getServiceEndpointPublisher()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry =
registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
- return (AbstractServiceEndpointPublisher)entry.getTarget();
- }
-
- /** Return true if the deployment contains a web service endpoint
- */
- protected abstract boolean isWebserviceDeployment(DeploymentInfo di);
-
- protected abstract UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo
di) throws Exception;
-
- protected UnifiedDeploymentInfo getUnifiedDeploymentInfo(DeploymentInfo di)
- {
- return
(UnifiedDeploymentInfo)di.context.get(UnifiedDeploymentInfo.class.getName());
- }
-
- /** Handle all webservice deployment exceptions.
- * You can either simply logs 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);
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-//$Id$
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer service that manages WS4EE compliant Web-Services for EJB Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Jan-2005
- */
-public abstract class DeployerInterceptorEJB extends DeployerInterceptor
-{
- protected void createServiceEndpoint(DeploymentInfo di) throws Exception
- {
- super.createServiceEndpoint(di);
-
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- UnifiedMetaData wsMetaData =
getServiceEndpointDeployer().getUnifiedMetaData(udi);
- udi.webappURL = generateWebDeployment(di, wsMetaData);
- udi.context.put(DeploymentInfo.class.getName(), di);
- getServiceEndpointPublisher().publishServiceEndpoint(udi);
- }
- }
-
- protected abstract URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData
wsMetaData) throws IOException;
-
- protected void destroyServiceEndpoint(DeploymentInfo di) throws Exception
- {
- super.destroyServiceEndpoint(di);
-
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- getServiceEndpointPublisher().destroyServiceEndpoint(udi);
- }
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-//$Id$
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Iterator;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.BeanMetaData;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.integration.jboss42.ServiceEndpointGeneratorEJB21;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer service that manages WS4EE compliant Web-Services for EJB-2.1 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Jan-2005
- */
-public class DeployerInterceptorEJB21 extends DeployerInterceptorEJB implements
DeployerInterceptorEJB21MBean
-{
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
- {
- UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
- UnifiedDeploymentInfo udi = new
JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, vfsWebservices);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- return udi;
- }
-
- /** Return true if the deployment is a web service endpoint
- */
- protected boolean isWebserviceDeployment(DeploymentInfo di)
- {
- ApplicationMetaData applMetaData = (ApplicationMetaData)di.metaData;
- boolean isWebserviceDeployment = applMetaData.isWebServiceDeployment();
-
- // Check if we have a webservices.xml descriptor
- if (isWebserviceDeployment == false)
- {
- isWebserviceDeployment = getWebservicesFile(di) != null;
- }
-
- // Check if the ejb-jar contains annotated endpoints
- if (isWebserviceDeployment == false)
- {
- try
- {
- Iterator itBeans = applMetaData.getEnterpriseBeans();
- while (itBeans.hasNext() && isWebserviceDeployment == false)
- {
- BeanMetaData beanMetaData = (BeanMetaData)itBeans.next();
- String ejbClassName = beanMetaData.getEjbClass();
- Class ejbClass = di.annotationsCl.loadClass(ejbClassName);
- if (ejbClass.isAnnotationPresent(javax.jws.WebService.class))
- throw new UnsupportedOperationException("JAXWS not supported on
EJB2.1 endpoints");
- }
- }
- catch (RuntimeException e)
- {
- throw e;
- }
- catch (Exception e)
- {
- throw new WSException(e);
- }
- }
-
- applMetaData.setWebServiceDeployment(isWebserviceDeployment);
- return isWebserviceDeployment;
- }
-
- private UnifiedVirtualFile getWebservicesFile(DeploymentInfo di)
- {
- UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(di.localCl);
- try
- {
- return vfsRoot.findChild("META-INF/webservices.xml");
- }
- catch (IOException e)
- {
- return null;
- }
- }
-
- protected URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData)
throws IOException
- {
- ServiceEndpointGeneratorEJB21 generator = new ServiceEndpointGeneratorEJB21();
- return generator.generatWebDeployment(wsMetaData, di);
- }
-
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21MBean.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21MBean.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB21MBean.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,37 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.integration.jboss40;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.SubDeployerInterceptorMBean;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- * @since 19-Jan-2005
- */
-public interface DeployerInterceptorEJB21MBean extends SubDeployerInterceptorMBean
-{
- //default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB21");
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,130 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-
-import javax.jws.WebService;
-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.server.JAXWSDeployment;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.jboss42.ServiceEndpointGeneratorEJB3;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer service that manages WS4EE compliant Web-Services for EJB3 Endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-May-2005
- */
-public class DeployerInterceptorEJB3 extends DeployerInterceptorEJB implements
DeployerInterceptorEJB3MBean
-{
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
- {
- UnifiedDeploymentInfo udi = new
JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
-
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
-
- // The container objects below provide access to all of the ejb metadata
- 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;
-
- return udi;
- }
-
- /** Return true if the deployment is a web service endpoint
- */
- protected boolean isWebserviceDeployment(DeploymentInfo di)
- {
- boolean isWebserviceDeployment = false;
-
- // Check if the ejb3 contains annotated endpoints
- Ejb3ModuleMBean ejb3Module = getEJB3Module(di.deployedObject);
- for (Object manager : ejb3Module.getContainers().values())
- {
- if (manager instanceof StatelessContainer)
- {
- StatelessContainer container = (StatelessContainer)manager;
- if (container.resolveAnnotation(WebService.class) != null)
- {
- isWebserviceDeployment = true;
- break;
- }
- }
- }
-
- return isWebserviceDeployment;
- }
-
- 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");
- }
- }
-
- protected URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData)
throws IOException
- {
- return new ServiceEndpointGeneratorEJB3().generatWebDeployment(wsMetaData, di);
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3MBean.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3MBean.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorEJB3MBean.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,37 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.integration.jboss40;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.SubDeployerInterceptorMBean;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- * @since 19-Jan-2005
- */
-public interface DeployerInterceptorEJB3MBean extends SubDeployerInterceptorMBean
-{
- //default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerEJB3");
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSE.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSE.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSE.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,170 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceProvider;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
-import org.jboss.ws.core.server.JAXWSDeployment;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.AbstractServiceEndpointPublisher.RewriteResults;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
-import org.jboss.ws.integration.UnifiedVirtualFile;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
-import org.jboss.ws.metadata.umdm.ServiceMetaData;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-
-/**
- * A deployer service that manages WS4EE compliant Web Services for WAR
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Jan-2005
- */
-public class DeployerInterceptorJSE extends DeployerInterceptor implements
DeployerInterceptorJSEMBean
-{
- /** Return true if the deployment is a web service endpoint
- */
- protected boolean isWebserviceDeployment(DeploymentInfo di)
- {
- WebMetaData webMetaData = (WebMetaData)di.metaData;
- boolean isWebserviceDeployment = webMetaData.isWebServiceDeployment();
-
- // Check if we have a webservices.xml descriptor
- if (isWebserviceDeployment == false)
- {
- if (getWebservicesFile(di) != null)
- {
- di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE);
- isWebserviceDeployment = true;
- }
- }
-
- // Check if the web.xml contains annotated endpoint impl
- if (isWebserviceDeployment == false)
- {
- Map servletClassMap = webMetaData.getServletClassMap();
- Iterator<String> it = servletClassMap.values().iterator();
- while (it.hasNext() && isWebserviceDeployment == false)
- {
- String servletClassName = it.next();
- try
- {
- Class servletClass = di.annotationsCl.loadClass(servletClassName);
- if (servletClass.isAnnotationPresent(WebService.class) ||
servletClass.isAnnotationPresent(WebServiceProvider.class))
- {
- di.context.put("UnifiedDeploymentInfo.Type",
UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
- isWebserviceDeployment = true;
- }
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + servletClassName);
- }
- }
- }
-
- webMetaData.setWebServiceDeployment(isWebserviceDeployment);
- return isWebserviceDeployment;
- }
-
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
- {
- UnifiedDeploymentInfo udi;
-
- DeploymentType type =
(DeploymentType)di.context.get("UnifiedDeploymentInfo.Type");
- if (type == UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE)
- {
- UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
- udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE,
vfsWebservices);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- }
- else if (type == UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE)
- {
- udi = new JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
- }
- else
- {
- throw new WSException("Unexpected type: " + type);
- }
-
- return udi;
- }
-
- /** Overwrite to create the webservice
- *
- * This implemantation modifies the servlet entries in web.xml
- */
- protected void createServiceEndpoint(DeploymentInfo di) throws Exception
- {
- super.createServiceEndpoint(di);
- UnifiedDeploymentInfo udi = getUnifiedDeploymentInfo(di);
- if (udi != null)
- {
- AbstractServiceEndpointPublisher endpointPublisher =
getServiceEndpointPublisher();
- RewriteResults results = endpointPublisher.rewriteWebXml(udi);
- updateServiceEndpointTargetBeans(udi, results);
- }
- }
-
- private void updateServiceEndpointTargetBeans(UnifiedDeploymentInfo udi,
RewriteResults results)
- {
- UnifiedMetaData wsMetaData = getServiceEndpointDeployer().getUnifiedMetaData(udi);
- Map<String, String> sepTargetMap = results.sepTargetMap;
-
- for (ServiceMetaData serviceMetaData : wsMetaData.getServices())
- {
- for (EndpointMetaData epMetaData : serviceMetaData.getEndpoints())
- {
- ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)epMetaData;
- String targetBean = sepTargetMap.get(sepMetaData.getLinkName());
- sepMetaData.setServiceEndpointImplName(targetBean);
- }
- }
- }
-
- private UnifiedVirtualFile getWebservicesFile(DeploymentInfo di)
- {
- UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(di.localCl);
- try
- {
- return vfsRoot.findChild("WEB-INF/webservices.xml");
- }
- catch (IOException e)
- {
- return null;
- }
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSEMBean.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSEMBean.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorJSEMBean.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,37 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.integration.jboss40;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.SubDeployerInterceptorMBean;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- * @since 19-Jan-2005
- */
-public interface DeployerInterceptorJSEMBean extends SubDeployerInterceptorMBean
-{
- //default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerJSE");
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSE.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSE.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSE.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.deployment.SubDeployerSupport;
-import org.jboss.system.server.ServerConfig;
-import org.jboss.system.server.ServerConfigLocator;
-import org.jboss.ws.core.utils.IOUtils;
-
-/**
- * A deployer service that manages WS4EE compliant Web Services for
- * nested POJO endpoints.
- *
- * The WebServiceDeployerJSE attaches itself as an deployment interceptor to
- * the jboss.web:service=WebServer deployer. As a consequence, all *.war deployments
- * that are picked up before the interceptor is installed are not treated as potential
- * web service endpoint deployments.
- *
- * Nested POJO endpoints can be packaged in *.jse deployments that are then picked up by
this
- * deployer.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 03-Mar-2005
- */
-public class DeployerInterceptorNestedJSE extends SubDeployerSupport implements
DeployerInterceptorNestedJSEMBean
-{
- private static final String NESTED_JSE_WAR_FILE =
"org.jboss.ws.server.nested.jse";
-
- // The MainDeployer
- protected MainDeployerMBean mainDeployer;
-
- public void setMainDeployer(MainDeployerMBean mainDeployer)
- {
- this.mainDeployer = mainDeployer;
- }
-
- public boolean accepts(DeploymentInfo sdi)
- {
- setSuffixes(new String[] { ".jse" });
- return super.accepts(sdi);
- }
-
- /** Copy the *.jse to a *.war and deploy through the main deployer
- */
- public void create(DeploymentInfo di) throws DeploymentException
- {
- log.debug("create: " + di.url);
-
- try
- {
- File jseFile = new File(di.localUrl.getFile());
- if (jseFile.isFile() == false)
- throw new DeploymentException("Expected a file: " + di.localUrl);
-
- ServerConfig config = ServerConfigLocator.locate();
- String warFileName = config.getServerTempDir().getCanonicalPath() +
"/deploy/" + di.shortName;
- warFileName = warFileName.substring(0, warFileName.length() - 4) +
".war";
- File warFile = new File(warFileName);
-
- FileOutputStream fos = new FileOutputStream(warFile);
- FileInputStream fis = new FileInputStream(jseFile);
- try
- {
- IOUtils.copyStream(fos, fis);
- }
- finally
- {
- fos.close();
- fis.close();
- }
-
- mainDeployer.deploy(warFile.toURL());
-
- // remember the war url that we deployed
- di.context.put(NESTED_JSE_WAR_FILE, warFile);
-
- super.create(di);
- }
- catch (IOException ex)
- {
- throw new DeploymentException("Failed to create: " + di.url, ex);
- }
- }
-
- /** Undeploy the *.war through the main deployer
- */
- public void destroy(DeploymentInfo di) throws DeploymentException
- {
- log.debug("destroy: " + di.url);
- try
- {
- File warFile = (File)di.context.get(NESTED_JSE_WAR_FILE);
- mainDeployer.undeploy(warFile.toURL());
- warFile.delete();
-
- super.destroy(di);
- }
- catch (IOException ex)
- {
- throw new DeploymentException("Failed to destroy: " + di.url, ex);
- }
- }
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSEMBean.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSEMBean.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeployerInterceptorNestedJSEMBean.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,42 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.MainDeployerMBean;
-import org.jboss.deployment.SubDeployerMBean;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 03-Mar-2005
- */
-public interface DeployerInterceptorNestedJSEMBean extends SubDeployerMBean
-{
- //default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=WebServiceDeployerNestedJSE");
-
- void setMainDeployer(MainDeployerMBean mainDeployer);
-}
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeploymentInfoAdaptor.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeploymentInfoAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/DeploymentInfoAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.integration.jboss42.WebMetaDataAdaptor;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-
-/**
- * Build container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class DeploymentInfoAdaptor
-{
- public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi,
DeploymentInfo di) throws Exception
- {
- 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);
-
- return udi;
- }
-
- private static URL getDeploymentURL(DeploymentInfo di) throws MalformedURLException
- {
- URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
- if ("file".equals(deploymentURL.getProtocol()))
- {
- String path = deploymentURL.getPath();
- if (new File(path).isFile())
- {
- deploymentURL = new URL("jar:file:" + path + "!/");
- }
- }
- return deploymentURL;
- }
-
- private static void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
- {
- if (metaData instanceof WebMetaData)
- {
- udi.metaData =
WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
- udi.webappURL = udi.url;
- }
- else if (metaData instanceof ApplicationMetaData)
- {
- udi.metaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
- }
- }
-}
Added:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
(rev 0)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration.jboss40;
+
+// $Id$
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.LinkedHashMap;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
+import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
+import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
+import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * Build container independent service ref meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ServiceRefMetaDataAdapter
+{
+ public UnifiedServiceRefMetaData buildServiceRefMetaData(UnifiedDeploymentInfo udi,
ServiceRefMetaData srmd) throws IOException
+ {
+ UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData(udi.vfRoot);
+ usrmd.setServiceRefName(srmd.getServiceRefName());
+ usrmd.setServiceInterface(srmd.getServiceInterface());
+ usrmd.setWsdlFile(srmd.getWsdlFile());
+ usrmd.setMappingFile(srmd.getJaxrpcMappingFile());
+ usrmd.setServiceQName(srmd.getServiceQName());
+
+ LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
+ for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
+ {
+ UnifiedPortComponentRefMetaData upcmd = new
UnifiedPortComponentRefMetaData(usrmd);
+ upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
+ upcmd.setPortComponentLink(pcmd.getPortComponentLink());
+ Properties callProps = pcmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ upcmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+ pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
+ usrmd.addPortComponentRef(upcmd);
+ }
+
+ for (HandlerMetaData hmd : srmd.getHandlers())
+ {
+ UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
+ uhmd.setHandlerName(hmd.getHandlerName());
+ uhmd.setHandlerClass(hmd.getHandlerClass());
+
+ for(String portname : hmd.getPortNames())
+ {
+ uhmd.addPortName(portname);
+ }
+ for (InitParamMetaData ipmd : hmd.getInitParams())
+ {
+ UnifiedInitParamMetaData ip = new UnifiedInitParamMetaData();
+ ip.setParamName(ipmd.getParamName());
+ ip.setParamValue(ipmd.getParamValue());
+ uhmd.addInitParam(ip);
+ }
+ for (QName soapHeader : hmd.getSoapHeaders())
+ {
+ uhmd.addSoapHeader(soapHeader);
+ }
+ for (String soapRole : hmd.getSoapRoles())
+ {
+ uhmd.addSoapRole(soapRole);
+ }
+ usrmd.addHandler(uhmd);
+ }
+
+ usrmd.setConfigName(srmd.getConfigName());
+ usrmd.setConfigFile(srmd.getConfigFile());
+ URL wsdlOverride = srmd.getWsdlOverride();
+ if (wsdlOverride != null)
+ usrmd.setWsdlOverride(wsdlOverride.toExternalForm());
+
+ Properties callProps = srmd.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<Object> keys = callProps.keys();
+ while(keys.hasMoreElements())
+ {
+ String name = (String)keys.nextElement();
+ String value = callProps.getProperty(name);
+ usrmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
+ }
+ }
+
+ return usrmd;
+ }
+}
Property changes on:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapterFactory.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapterFactory.java
(rev 0)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapterFactory.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -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.jboss40;
+
+// $Id$
+
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.integration.KernelLocator;
+
+/**
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-Mar-2007
+ */
+public class ServiceRefMetaDataAdapterFactory
+{
+ // Hide ctor
+ private ServiceRefMetaDataAdapterFactory()
+ {
+ }
+
+ public static ServiceRefMetaDataAdapter newInstance()
+ {
+ KernelRegistry registry = KernelLocator.getKernel().getRegistry();
+ KernelRegistryEntry entry =
registry.getEntry("ServiceRefMetaDataAdapter");
+ return (ServiceRefMetaDataAdapter)entry.getTarget();
+ }
+}
Property changes on:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdapterFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/ServiceRefMetaDataAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss40;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.LinkedHashMap;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.webservice.metadata.serviceref.HandlerMetaData;
-import org.jboss.webservice.metadata.serviceref.InitParamMetaData;
-import org.jboss.webservice.metadata.serviceref.PortComponentRefMetaData;
-import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Build container independent service ref meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ServiceRefMetaDataAdaptor
-{
- public static UnifiedServiceRefMetaData buildServiceRefMetaData(UnifiedDeploymentInfo
udi, ServiceRefMetaData srmd) throws IOException
- {
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData(udi.vfRoot);
- usrmd.setServiceRefName(srmd.getServiceRefName());
- usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlFile(srmd.getWsdlFile());
- usrmd.setMappingFile(srmd.getJaxrpcMappingFile());
- usrmd.setServiceQName(srmd.getServiceQName());
-
- LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
- {
- UnifiedPortComponentRefMetaData upcmd = new
UnifiedPortComponentRefMetaData(usrmd);
- upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
- upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- Properties callProps = pcmd.getCallProperties();
- if (callProps != null)
- {
- Enumeration<Object> keys = callProps.keys();
- while(keys.hasMoreElements())
- {
- String name = (String)keys.nextElement();
- String value = callProps.getProperty(name);
- upcmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
- }
- pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
- usrmd.addPortComponentRef(upcmd);
- }
-
- for (HandlerMetaData hmd : srmd.getHandlers())
- {
- UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
- uhmd.setHandlerName(hmd.getHandlerName());
- uhmd.setHandlerClass(hmd.getHandlerClass());
-
- for(String portname : hmd.getPortNames())
- {
- uhmd.addPortName(portname);
- }
- for (InitParamMetaData ipmd : hmd.getInitParams())
- {
- UnifiedInitParamMetaData ip = new UnifiedInitParamMetaData();
- ip.setParamName(ipmd.getParamName());
- ip.setParamValue(ipmd.getParamValue());
- uhmd.addInitParam(ip);
- }
- for (QName soapHeader : hmd.getSoapHeaders())
- {
- uhmd.addSoapHeader(soapHeader);
- }
- for (String soapRole : hmd.getSoapRoles())
- {
- uhmd.addSoapRole(soapRole);
- }
- usrmd.addHandler(uhmd);
- }
-
- usrmd.setConfigName(srmd.getConfigName());
- usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride().toExternalForm());
-
- Properties callProps = srmd.getCallProperties();
- if (callProps != null)
- {
- Enumeration<Object> keys = callProps.keys();
- while(keys.hasMoreElements())
- {
- String name = (String)keys.nextElement();
- String value = callProps.getProperty(name);
- usrmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
- }
-
- return usrmd;
- }
-}
Modified:
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java
===================================================================
---
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/java/org/jboss/ws/integration/jboss40/WebServiceClientDeployer.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -34,6 +34,8 @@
import org.jboss.webservice.metadata.serviceref.ServiceRefMetaData;
import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.URLLoaderAdapter;
+import org.jboss.ws.integration.jboss42.DeploymentInfoAdapterFactory;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -65,14 +67,15 @@
// Build the container independent deployment info
UnifiedDeploymentInfo udi = new
JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
- UnifiedServiceRefMetaData usr =
ServiceRefMetaDataAdaptor.buildServiceRefMetaData(udi, serviceRef);
+ UnifiedServiceRefMetaData usr =
ServiceRefMetaDataAdapterFactory.newInstance().buildServiceRefMetaData(udi, serviceRef);
+ usr.setVfsRoot(new URLLoaderAdapter(udi.url));
ServiceReferenceable ref = new ServiceReferenceable(usr);
Util.bind(envCtx, serviceRefName, ref);
- log.debug("<service-ref> bound to: java:comp/env/" +
serviceRefName);
+ log.debug("Webservice binding: java:comp/env/" + serviceRefName);
}
}
catch (Exception e)
@@ -80,4 +83,10 @@
throw new DeploymentException("Cannot bind webservice to client
environment", e);
}
}
+
+ private ServiceRefMetaDataAdapter getServiceRefMetaDataAdaptor()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
Modified: trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
---
trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss40/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
- <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator">
+ <bean name="KernelLocator"
class="org.jboss.ws.integration.KernelLocator">
<property name="kernel"><inject
bean="jboss.kernel:service=Kernel"/></property>
</bean>
@@ -51,4 +51,16 @@
<bean name="ServerConfig"
class="org.jboss.ws.integration.jboss42.ServerConfigImpl"/>
+ <bean name="DeploymentInfoAdapter"
class="org.jboss.ws.integration.jboss42.DeploymentInfoAdapter">
+ <property name="applicationMetaDataAdapter">
+ <inject bean="ApplicationMetaDataAdapter"/>
+ </property>
+ <property name="webMetaDataAdapter">
+ <inject bean="WebMetaDataAdapter"/>
+ </property>
+ </bean>
+ <bean name="ServiceRefMetaDataAdapter"
class="org.jboss.ws.integration.jboss40.ServiceRefMetaDataAdapter"/>
+ <bean name="ApplicationMetaDataAdapter"
class="org.jboss.ws.integration.jboss40.ApplicationMetaDataAdapter"/>
+ <bean name="WebMetaDataAdapter"
class="org.jboss.ws.integration.jboss42.WebMetaDataAdapter"/>
+
</deployment>
Modified: trunk/integration-jboss42/build.xml
===================================================================
--- trunk/integration-jboss42/build.xml 2007-03-12 09:43:56 UTC (rev 2597)
+++ trunk/integration-jboss42/build.xml 2007-03-12 10:11:14 UTC (rev 2598)
@@ -161,6 +161,7 @@
<!-- The JBossAS testsuite references jbossws from thirdparty -->
<copy todir="${jboss42.home}/../../../thirdparty/jboss/jbossws/lib"
overwrite="true">
<fileset dir="${core.output.lib.dir}">
+ <include name="jbossws-integration.jar"/>
<include name="jbossws-client.jar"/>
<include name="jbossws-core.jar"/>
<include name="jboss-jaxrpc.jar"/>
@@ -188,4 +189,4 @@
<target name="all" description="Create a distribution zip file"
depends="main">
</target>
-</project>
\ No newline at end of file
+</project>
Added:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/AbstractApplicationMetaDataAdapter.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/AbstractApplicationMetaDataAdapter.java
(rev 0)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/AbstractApplicationMetaDataAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,84 @@
+/*
+ * 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.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+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(a)jboss.org
+ * @since 05-May-2006
+ */
+public abstract class AbstractApplicationMetaDataAdapter
+{
+ public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(ApplicationMetaData
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:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/AbstractApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java
(rev 0)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -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;
+
+// $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(a)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:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ApplicationMetaDataAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $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.metadata.EjbPortComponentMetaData;
-import org.jboss.metadata.MessageDrivenMetaData;
-import org.jboss.metadata.SessionMetaData;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
-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;
-import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ApplicationMetaDataAdaptor
-{
- public static UnifiedApplicationMetaData
buildUnifiedApplicationMetaData(ApplicationMetaData 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;
- }
-
- private static PublishLocationAdapter getPublishLocationAdpater(final
ApplicationMetaData apmd)
- {
- return new PublishLocationAdapter ()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return apmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- private static 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);
- }
-
- private static 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;
- }
-}
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -27,7 +27,6 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.MainDeployerMBean;
import org.jboss.deployment.SubDeployerInterceptorSupport;
-import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.metadata.WebMetaData;
@@ -36,6 +35,7 @@
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
import org.jboss.ws.core.server.ServiceEndpointDeployer;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.KernelLocator;
/**
* A deployer service that manages WS4EE compliant Web Services
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB21.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -32,9 +32,9 @@
import org.jboss.metadata.BeanMetaData;
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
/**
@@ -49,7 +49,7 @@
{
UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
UnifiedDeploymentInfo udi = new
JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_EJB21, vfsWebservices);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
return udi;
}
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorEJB3.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -55,7 +55,7 @@
protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
{
UnifiedDeploymentInfo udi = new
JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeployerInterceptorJSE.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -38,10 +38,10 @@
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher.RewriteResults;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
@@ -108,12 +108,12 @@
{
UnifiedVirtualFile vfsWebservices = getWebservicesFile(di);
udi = new JAXRPCDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_JSE,
vfsWebservices);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
}
else if (type == UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE)
{
udi = new JAXWSDeployment(UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdapterFactory.newInstance().buildDeploymentInfo(udi, di);
}
else
{
Added:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
(rev 0)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,103 @@
+/*
+ * 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.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class DeploymentInfoAdapter
+{
+ private WebMetaDataAdapter webMetaDataAdapter;
+ private AbstractApplicationMetaDataAdapter applicationMetaDataAdapter;
+
+ public void setApplicationMetaDataAdapter(AbstractApplicationMetaDataAdapter
applicationMetaDataAdapter)
+ {
+ this.applicationMetaDataAdapter = applicationMetaDataAdapter;
+ }
+
+ public void setWebMetaDataAdapter(WebMetaDataAdapter webMetaDataAdapter)
+ {
+ this.webMetaDataAdapter = webMetaDataAdapter;
+ }
+
+ public UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi,
DeploymentInfo di) throws Exception
+ {
+ 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);
+
+ return udi;
+ }
+
+ private URL getDeploymentURL(DeploymentInfo di) throws MalformedURLException
+ {
+ URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
+ if ("file".equals(deploymentURL.getProtocol()))
+ {
+ String path = deploymentURL.getPath();
+ if (new File(path).isFile())
+ {
+ deploymentURL = new URL("jar:file:" + path + "!/");
+ }
+ }
+ return deploymentURL;
+ }
+
+ private void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+ {
+ if (metaData instanceof WebMetaData)
+ {
+ udi.metaData =
webMetaDataAdapter.buildUnifiedWebMetaData((WebMetaData)metaData);
+ udi.webappURL = udi.url;
+ }
+ else if (metaData instanceof ApplicationMetaData)
+ {
+ udi.metaData =
applicationMetaDataAdapter.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
+ }
+ }
+}
Property changes on:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapterFactory.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapterFactory.java
(rev 0)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapterFactory.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -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;
+
+// $Id$
+
+import org.jboss.kernel.spi.registry.KernelRegistry;
+import org.jboss.kernel.spi.registry.KernelRegistryEntry;
+import org.jboss.ws.integration.KernelLocator;
+
+/**
+ * @author Thomas.Diesler(a)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:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdapterFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/DeploymentInfoAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $Id$
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-
-/**
- * Build container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class DeploymentInfoAdaptor
-{
- public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi,
DeploymentInfo di) throws Exception
- {
- 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);
-
- return udi;
- }
-
- private static URL getDeploymentURL(DeploymentInfo di) throws MalformedURLException
- {
- URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
- if ("file".equals(deploymentURL.getProtocol()))
- {
- String path = deploymentURL.getPath();
- if (new File(path).isFile())
- {
- deploymentURL = new URL("jar:file:" + path + "!/");
- }
- }
- return deploymentURL;
- }
-
- private static void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
- {
- if (metaData instanceof WebMetaData)
- {
- udi.metaData =
WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
- udi.webappURL = udi.url;
- }
- else if (metaData instanceof ApplicationMetaData)
- {
- udi.metaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
- }
- }
-}
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandler.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $Id$
-
-import java.util.Iterator;
-
-import javax.naming.Context;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.system.ServiceMBeanSupport;
-import org.jboss.util.naming.Util;
-import org.jboss.ws.core.jaxrpc.client.ServiceReferenceable;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientDeployment;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Binds a JAXRPC Service object in the client's ENC for every service-ref element in
the
- * deployment descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 15-Jan-2005
- */
-public class ServiceRefHandler extends ServiceMBeanSupport implements
ServiceRefHandlerMBean
-{
- /**
- * This binds a jaxrpc Service into the callers ENC for every service-ref element
- *
- * @param envCtx ENC to bind the javax.rpc.xml.Service object to
- * @param serviceRefs An iterator of the service-ref elements in the client deployment
descriptor
- * @param di The client's deployment info
- * @throws org.jboss.deployment.DeploymentException if it goes wrong
- */
- public void bindServiceRefs(Context envCtx, Iterator serviceRefs, DeploymentInfo di)
throws DeploymentException
- {
- try
- {
- while (serviceRefs.hasNext())
- {
- ServiceRefMetaData serviceRef = (ServiceRefMetaData)serviceRefs.next();
- String serviceRefName = serviceRef.getServiceRefName();
-
- // Build the container independent deployment info
- UnifiedDeploymentInfo udi = new
JAXRPCClientDeployment(UnifiedDeploymentInfo.DeploymentType.JAXRPC_Client);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
-
- UnifiedServiceRefMetaData usr =
ServiceRefMetaDataAdaptor.buildServiceRefMetaData(udi, serviceRef);
-
- ServiceReferenceable ref = new ServiceReferenceable(usr);
- Util.bind(envCtx, serviceRefName, ref);
-
- log.debug("<service-ref> bound to: java:comp/env/" +
serviceRefName);
- }
- }
- catch (Exception e)
- {
- throw new DeploymentException("Cannot bind webservice to client
environment", e);
- }
- }
-}
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefHandlerMBean.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,38 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.ws.integration.jboss42;
-
-import javax.management.ObjectName;
-
-import org.jboss.system.ServiceMBean;
-import org.jboss.metadata.serviceref.ServiceRefHandler;
-import org.jboss.ws.core.utils.ObjectNameFactory;
-
-/**
- * MBean interface.
- * @since 19-Jan-2005
- */
-public interface ServiceRefHandlerMBean extends ServiceRefHandler, ServiceMBean
-{
- // default object name
- public static final ObjectName OBJECT_NAME =
ObjectNameFactory.create("jboss.ws:service=ServiceRefHandler");
-}
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceRefMetaDataAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.LinkedHashMap;
-import java.util.Properties;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.metadata.serviceref.HandlerMetaData;
-import org.jboss.metadata.serviceref.InitParamMetaData;
-import org.jboss.metadata.serviceref.PortComponentRefMetaData;
-import org.jboss.metadata.serviceref.ServiceRefMetaData;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * Build container independent service ref meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ServiceRefMetaDataAdaptor
-{
- public static UnifiedServiceRefMetaData buildServiceRefMetaData(UnifiedDeploymentInfo
udi, ServiceRefMetaData srmd) throws IOException
- {
- UnifiedServiceRefMetaData usrmd = new UnifiedServiceRefMetaData(udi.vfRoot);
- usrmd.setServiceRefName(srmd.getServiceRefName());
- usrmd.setServiceInterface(srmd.getServiceInterface());
- usrmd.setWsdlFile(srmd.getWsdlFile());
- usrmd.setMappingFile(srmd.getJaxrpcMappingFile());
- usrmd.setServiceQName(srmd.getServiceQName());
-
- LinkedHashMap<String, UnifiedPortComponentRefMetaData> pcrefs = new
LinkedHashMap<String, UnifiedPortComponentRefMetaData>();
- for (PortComponentRefMetaData pcmd : srmd.getPortComponentRefs())
- {
- UnifiedPortComponentRefMetaData upcmd = new
UnifiedPortComponentRefMetaData(usrmd);
- upcmd.setServiceEndpointInterface(pcmd.getServiceEndpointInterface());
- upcmd.setPortComponentLink(pcmd.getPortComponentLink());
- Properties callProps = pcmd.getCallProperties();
- if (callProps != null)
- {
- Enumeration<Object> keys = callProps.keys();
- while(keys.hasMoreElements())
- {
- String name = (String)keys.nextElement();
- String value = callProps.getProperty(name);
- upcmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
- }
- pcrefs.put(pcmd.getServiceEndpointInterface(), upcmd);
- usrmd.addPortComponentRef(upcmd);
- }
-
- for (HandlerMetaData hmd : srmd.getHandlers())
- {
- UnifiedHandlerMetaData uhmd = new UnifiedHandlerMetaData(null);
- uhmd.setHandlerName(hmd.getHandlerName());
- uhmd.setHandlerClass(hmd.getHandlerClass());
-
- for(String portname : hmd.getPortNames())
- {
- uhmd.addPortName(portname);
- }
- for (InitParamMetaData ipmd : hmd.getInitParams())
- {
- UnifiedInitParamMetaData ip = new UnifiedInitParamMetaData();
- ip.setParamName(ipmd.getParamName());
- ip.setParamValue(ipmd.getParamValue());
- uhmd.addInitParam(ip);
- }
- for (QName soapHeader : hmd.getSoapHeaders())
- {
- uhmd.addSoapHeader(soapHeader);
- }
- for (String soapRole : hmd.getSoapRoles())
- {
- uhmd.addSoapRole(soapRole);
- }
- usrmd.addHandler(uhmd);
- }
-
- usrmd.setConfigName(srmd.getConfigName());
- usrmd.setConfigFile(srmd.getConfigFile());
- usrmd.setWsdlOverride(srmd.getWsdlOverride().toExternalForm());
-
- Properties callProps = srmd.getCallProperties();
- if (callProps != null)
- {
- Enumeration<Object> keys = callProps.keys();
- while(keys.hasMoreElements())
- {
- String name = (String)keys.nextElement();
- String value = callProps.getProperty(name);
- usrmd.addCallProperty(new UnifiedCallPropertyMetaData(name, value));
- }
- }
-
- return usrmd;
- }
-}
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/URLLoaderAdapter.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/URLLoaderAdapter.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/URLLoaderAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $Id$
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-
-/**
- * The default file adapter loads resources through an associated classloader.
- * If no classload is set, the the thread context classloader will be used.
- *
- * @author Heiko.Braun(a)jboss.org
- * @since 25.01.2007
- */
-public class URLLoaderAdapter implements UnifiedVirtualFile
-{
- private URL rootURL;
- private URL resourceURL;
- private transient URLClassLoader loader;
-
- public URLLoaderAdapter(URL rootURL)
- {
- this.rootURL = rootURL;
- }
-
- private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
- {
- this.rootURL = rootURL;
- this.resourceURL = resourceURL;
- this.loader = loader;
- }
-
- public UnifiedVirtualFile findChild(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null)
- {
- // Try the child as URL
- try
- {
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (resourceURL == null)
- {
- try
- {
- File file = new File(resourcePath);
- if (file.exists())
- resourceURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (resourceURL == null)
- {
- try
- {
- resourceURL = getResourceLoader().getResource(resourcePath);
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- }
-
- if (resourceURL == null)
- throw new IOException("Cannot get URL for: " + resourcePath);
-
- return new URLLoaderAdapter(rootURL, loader, resourceURL);
- }
-
- public URL toURL()
- {
- if (null == this.resourceURL)
- throw new IllegalStateException("UnifiedVirtualFile not
initialized");
- return resourceURL;
- }
-
- private URLClassLoader getResourceLoader()
- {
- if (loader == null)
- {
- ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
- loader = new URLClassLoader(new URL[]{rootURL}, ctxLoader);
- }
- return loader;
- }
-}
Added:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
(rev 0)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -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;
+
+// $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.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(a)jboss.org
+ * @since 05-May-2006
+ */
+public class WebMetaDataAdapter
+{
+ public UnifiedWebMetaData buildUnifiedWebMetaData(WebMetaData wmd)
+ {
+ UnifiedWebMetaData umd = new UnifiedWebMetaData();
+ umd.setContextRoot(wmd.getContextRoot());
+ umd.setServletMappings(wmd.getServletMappings());
+ umd.setServletClassNames(getServletClassMap(wmd));
+ umd.setConfigName(wmd.getConfigName());
+ umd.setConfigFile(wmd.getConfigFile());
+ umd.setSecurityDomain(wmd.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
+ umd.setSecurityMetaData(getSecurityMetaData(wmd.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:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java
===================================================================
---
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/WebMetaDataAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.integration.jboss42;
-
-// $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.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(a)jboss.org
- * @since 05-May-2006
- */
-public class WebMetaDataAdaptor
-{
- public static UnifiedWebMetaData buildUnifiedWebMetaData(WebMetaData wmd)
- {
- UnifiedWebMetaData umd = new UnifiedWebMetaData();
- umd.setContextRoot(wmd.getContextRoot());
- umd.setServletMappings(wmd.getServletMappings());
- umd.setServletClassNames(getServletClassMap(wmd));
- umd.setConfigName(wmd.getConfigName());
- umd.setConfigFile(wmd.getConfigFile());
- umd.setSecurityDomain(wmd.getSecurityDomain());
- umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
- umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
-
- return umd;
- }
-
- private static PublishLocationAdapter getPublishLocationAdpater(final WebMetaData
wmd)
- {
- return new PublishLocationAdapter ()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return wmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- private static 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 static 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;
- }
-}
Modified: trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
---
trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
- <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator">
+ <bean name="KernelLocator"
class="org.jboss.ws.integration.KernelLocator">
<property name="kernel"><inject
bean="jboss.kernel:service=Kernel"/></property>
</bean>
@@ -46,12 +46,23 @@
<property
name="serviceEndpointServlet">org.jboss.ws.integration.jboss42.JBossServiceEndpointServlet</property>
</bean>
- <!-- Bind JAXWS Service objects in client environment context -->
- <bean name="WebServiceRefHandler"
class="org.jboss.ws.integration.jboss42.WebServiceRefHandler"/>
+ <!-- Bind Service objects in client environment context -->
+ <bean name="ServiceRefHandler"
class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/>
<!-- A subscription manager for WS-Eventing -->
<bean name="SubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
<bean name="ServerConfig"
class="org.jboss.ws.integration.jboss42.ServerConfigImpl"/>
-
+
+ <bean name="DeploymentInfoAdapter"
class="org.jboss.ws.integration.jboss42.DeploymentInfoAdapter">
+ <property name="applicationMetaDataAdapter">
+ <inject bean="ApplicationMetaDataAdapter"/>
+ </property>
+ <property name="webMetaDataAdapter">
+ <inject bean="WebMetaDataAdapter"/>
+ </property>
+ </bean>
+ <bean name="ApplicationMetaDataAdapter"
class="org.jboss.ws.integration.jboss42.ApplicationMetaDataAdapter"/>
+ <bean name="WebMetaDataAdapter"
class="org.jboss.ws.integration.jboss42.WebMetaDataAdapter"/>
+
</deployment>
Modified:
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml
===================================================================
---
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service-no-ejb3.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -5,13 +5,6 @@
<server>
<!--
- Bind JAXRPC ServiceRefs
- -->
- <mbean name="jboss.ws:service=ServiceRefHandler"
code="org.jboss.ws.integration.jboss42.ServiceRefHandler">
- <depends>jboss:service=Naming</depends>
- </mbean>
-
- <!--
A deployer service for JSE endpoints.
-->
<mbean name="jboss.ws:service=WebServiceDeployerJSE"
code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
Modified: trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml
===================================================================
---
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-jboss42/src/resources/jbossws.sar/META-INF/jboss-service.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -5,13 +5,6 @@
<server>
<!--
- Bind JAXRPC ServiceRefs
- -->
- <mbean name="jboss.ws:service=ServiceRefHandler"
code="org.jboss.ws.integration.jboss42.ServiceRefHandler">
- <depends>jboss:service=Naming</depends>
- </mbean>
-
- <!--
A deployer service for JSE endpoints.
-->
<mbean name="jboss.ws:service=WebServiceDeployerJSE"
code="org.jboss.ws.integration.jboss42.DeployerInterceptorJSE">
Modified:
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java
===================================================================
---
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/DeploymentInfoAdaptor.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -40,10 +40,10 @@
import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData;
import
org.jboss.ws.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.w3c.dom.Element;
/**
Modified:
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java
===================================================================
---
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/KernelBootstrap.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -27,8 +27,8 @@
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer;
+import org.jboss.logging.Logger;
import org.jboss.ws.integration.KernelLocator;
-import org.jboss.logging.Logger;
/**
* Bootstrap the microkernel in Tomcat
Modified:
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java
===================================================================
---
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/integration-tomcat/src/java/org/jboss/ws/integration/tomcat/TomcatServiceEndpointServlet.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -33,7 +33,6 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.ws.integration.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jboss.logging.Logger;
@@ -42,9 +41,10 @@
import org.jboss.ws.core.server.JAXWSDeployment;
import org.jboss.ws.core.server.ServiceEndpointDeployer;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.integration.KernelLocator;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCDeployment;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
/**
* A servlet that is installed for every web service endpoint.
Modified: trunk/integration-tomcat/src/resources/jbossws.war/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration-tomcat/src/resources/jbossws.war/META-INF/jboss-beans.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++ trunk/integration-tomcat/src/resources/jbossws.war/META-INF/jboss-beans.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -4,7 +4,7 @@
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
- <bean name="KernelLocator"
class="org.jboss.ws.core.server.KernelLocator">
+ <bean name="KernelLocator"
class="org.jboss.ws.integration.KernelLocator">
<property name="kernel"><inject
bean="jboss.kernel:service=Kernel"/></property>
</bean>
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-12 09:43:56
UTC (rev 2597)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-12 10:11:14
UTC (rev 2598)
@@ -54,11 +54,11 @@
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.core.utils.HolderUtils;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -44,6 +44,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.StubExt;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedCallPropertyMetaData;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
@@ -54,7 +55,6 @@
import org.jboss.ws.metadata.umdm.HandlerMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaDataJAXRPC;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -53,6 +53,7 @@
import org.jboss.ws.core.jaxws.client.DispatchImpl;
import org.jboss.ws.core.jaxws.client.ServiceObjectFactory;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
@@ -60,7 +61,6 @@
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedStubPropertyMetaData;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
Copied: trunk/jbossws-core/src/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
(from rev 2596,
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ResourceLoaderAdapter.java)
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/ResourceLoaderAdapter.java
(rev 0)
+++
trunk/jbossws-core/src/java/org/jboss/ws/integration/ResourceLoaderAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id: $
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+
+/**
+ * The default file adapter loads resources through an associated classloader.
+ * If no classload is set, the the thread context classloader will be used.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @since 25.01.2007
+ */
+public class ResourceLoaderAdapter implements UnifiedVirtualFile
+{
+ private URL resourceURL;
+ private ClassLoader loader;
+
+ public ResourceLoaderAdapter()
+ {
+ this(Thread.currentThread().getContextClassLoader());
+ }
+
+ public ResourceLoaderAdapter(ClassLoader loader)
+ {
+ this.loader = loader;
+ }
+
+ private ResourceLoaderAdapter(ClassLoader loader, URL resourceURL)
+ {
+ this.resourceURL = resourceURL;
+ this.loader = loader;
+ }
+
+ public UnifiedVirtualFile findChild(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null)
+ {
+ // Try the child as URL
+ try
+ {
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (resourceURL == null)
+ {
+ try
+ {
+ File file = new File(resourcePath);
+ if (file.exists())
+ resourceURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (resourceURL == null)
+ {
+ try
+ {
+ resourceURL = loader.getResource(resourcePath);
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ if (resourceURL == null)
+ throw new IOException("Cannot get URL for: " + resourcePath);
+
+ return new ResourceLoaderAdapter(loader, resourceURL);
+ }
+
+ public URL toURL()
+ {
+ if (null == this.resourceURL)
+ throw new IllegalStateException("UnifiedVirtualFile not
initialized");
+ return resourceURL;
+ }
+}
Added: trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
(rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jboss.ws.integration.UnifiedVirtualFile;
+
+/**
+ * The default file adapter loads resources through an associated classloader.
+ * If no classload is set, the the thread context classloader will be used.
+ *
+ * @author Heiko.Braun(a)jboss.org
+ * @since 25.01.2007
+ */
+public class URLLoaderAdapter implements UnifiedVirtualFile
+{
+ private URL rootURL;
+ private URL resourceURL;
+ private transient URLClassLoader loader;
+
+ public URLLoaderAdapter(URL rootURL)
+ {
+ this.rootURL = rootURL;
+ }
+
+ private URLLoaderAdapter(URL rootURL, URLClassLoader loader, URL resourceURL)
+ {
+ this.rootURL = rootURL;
+ this.resourceURL = resourceURL;
+ this.loader = loader;
+ }
+
+ public UnifiedVirtualFile findChild(String resourcePath) throws IOException
+ {
+ URL resourceURL = null;
+ if (resourcePath != null)
+ {
+ // Try the child as URL
+ try
+ {
+ resourceURL = new URL(resourcePath);
+ }
+ catch (MalformedURLException ex)
+ {
+ // ignore
+ }
+
+ // Try the filename as File
+ if (resourceURL == null)
+ {
+ try
+ {
+ File file = new File(resourcePath);
+ if (file.exists())
+ resourceURL = file.toURL();
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+
+ // Try the filename as Resource
+ if (resourceURL == null)
+ {
+ try
+ {
+ resourceURL = getResourceLoader().getResource(resourcePath);
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ }
+ }
+
+ if (resourceURL == null)
+ throw new IOException("Cannot get URL for: " + resourcePath);
+
+ return new URLLoaderAdapter(rootURL, loader, resourceURL);
+ }
+
+ public URL toURL()
+ {
+ if (null == this.resourceURL)
+ throw new IllegalStateException("UnifiedVirtualFile not
initialized");
+ return resourceURL;
+ }
+
+ private URLClassLoader getResourceLoader()
+ {
+ if (loader == null)
+ {
+ ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+ loader = new URLClassLoader(new URL[]{rootURL}, ctxLoader);
+ }
+ return loader;
+ }
+}
Property changes on:
trunk/jbossws-core/src/java/org/jboss/ws/integration/URLLoaderAdapter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -32,6 +32,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
@@ -40,7 +41,6 @@
import org.jboss.ws.metadata.jaxrpcmapping.ServiceEndpointInterfaceMapping;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -33,11 +33,11 @@
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -29,12 +29,12 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.utils.DOMUtils;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.metadata.config.binding.OMFactoryJAXRPC;
import org.jboss.ws.metadata.config.binding.OMFactoryJAXWS;
import org.jboss.ws.metadata.config.jaxrpc.ConfigRootJAXRPC;
import org.jboss.ws.metadata.config.jaxws.ConfigRootJAXWS;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -92,7 +92,9 @@
// Arbitrary proxy properties given by <call-property>
private List<UnifiedCallPropertyMetaData> callProperties = new
ArrayList<UnifiedCallPropertyMetaData>();
- private transient AnnotatedElement anElement;
+ // The JAXWS annotated element. JDK1.4 does not have
java.lang.reflect.AnnotatedElement so we use an untyped Object
+ private transient Object anElement;
+ // A flag that should be set when this service-ref has been bound.
private transient boolean processed;
public UnifiedServiceRefMetaData(UnifiedVirtualFile vfRoot)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -38,6 +38,7 @@
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.EndpointMetaData.Type;
import org.w3c.dom.Element;
Deleted:
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ResourceLoaderAdapter.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ResourceLoaderAdapter.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/ResourceLoaderAdapter.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.metadata.umdm;
-
-// $Id: $
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.ws.integration.UnifiedVirtualFile;
-
-/**
- * The default file adapter loads resources through an associated classloader.
- * If no classload is set, the the thread context classloader will be used.
- *
- * @author Heiko.Braun(a)jboss.org
- * @since 25.01.2007
- */
-public class ResourceLoaderAdapter implements UnifiedVirtualFile
-{
- private URL resourceURL;
- private ClassLoader loader;
-
- public ResourceLoaderAdapter()
- {
- this(Thread.currentThread().getContextClassLoader());
- }
-
- public ResourceLoaderAdapter(ClassLoader loader)
- {
- this.loader = loader;
- }
-
- private ResourceLoaderAdapter(ClassLoader loader, URL resourceURL)
- {
- this.resourceURL = resourceURL;
- this.loader = loader;
- }
-
- public UnifiedVirtualFile findChild(String resourcePath) throws IOException
- {
- URL resourceURL = null;
- if (resourcePath != null)
- {
- // Try the child as URL
- try
- {
- resourceURL = new URL(resourcePath);
- }
- catch (MalformedURLException ex)
- {
- // ignore
- }
-
- // Try the filename as File
- if (resourceURL == null)
- {
- try
- {
- File file = new File(resourcePath);
- if (file.exists())
- resourceURL = file.toURL();
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
-
- // Try the filename as Resource
- if (resourceURL == null)
- {
- try
- {
- resourceURL = loader.getResource(resourcePath);
- }
- catch (Exception ex)
- {
- // ignore
- }
- }
- }
-
- if (resourceURL == null)
- throw new IOException("Cannot get URL for: " + resourcePath);
-
- return new ResourceLoaderAdapter(loader, resourceURL);
- }
-
- public URL toURL()
- {
- if (null == this.resourceURL)
- throw new IllegalStateException("UnifiedVirtualFile not
initialized");
- return resourceURL;
- }
-}
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -35,8 +35,8 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.tools.jaxws.api.WSContractProvider;
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-core/src/java/org/jboss/ws/tools/metadata/ToolsUnifiedMetaDataBuilder.java 2007-03-12
10:11:14 UTC (rev 2598)
@@ -33,7 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.Style;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.ws.metadata.wsdl.WSDLUtils;
Modified:
trunk/jbossws-tests/src/resources/jaxrpc/jbws425/META-INF/application-client.xml
===================================================================
---
trunk/jbossws-tests/src/resources/jaxrpc/jbws425/META-INF/application-client.xml 2007-03-12
09:43:56 UTC (rev 2597)
+++
trunk/jbossws-tests/src/resources/jaxrpc/jbws425/META-INF/application-client.xml 2007-03-12
10:11:14 UTC (rev 2598)
@@ -10,7 +10,7 @@
<wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component-ref>
- <!-- kee the white space , it's part of the test -->
+ <!-- keep the white space , it's part of the test -->
<service-endpoint-interface>
org.jboss.test.ws.jaxrpc.jbws425.Hello</service-endpoint-interface>
</port-component-ref>
</service-ref>