JBossWS SVN: r3157 - branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-05-21 04:57:27 -0400 (Mon, 21 May 2007)
New Revision: 3157
Modified:
branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java
Log:
less mem usage
Modified: branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java
===================================================================
--- branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java 2007-05-20 11:37:37 UTC (rev 3156)
+++ branches/jbossws-2.0/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws801/JBWS801TestCase.java 2007-05-21 08:57:27 UTC (rev 3157)
@@ -61,9 +61,9 @@
}
public void testLargeFile() throws Exception
- {
- long size = 6L * 1024L * 1024L * 1024L; // approx 600mb
-
+ {
+ long size = 60L * 1024L * 1024L;
+
String methodName = "sendLargeFile";
SOAPMessage msg = setupMimeMessage(methodName);
DataHandler handler = new DataHandler(new GeneratorDataSource(size));
18 years, 11 months
JBossWS SVN: r3156 - branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 07:37:37 -0400 (Sun, 20 May 2007)
New Revision: 3156
Added:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/
Removed:
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/
Log:
Add xfire
Copied: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire (from rev 3155, branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri)
18 years, 11 months
JBossWS SVN: r3155 - in branches/tdiesler/trunk/integration: xfire and 21 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 07:36:59 -0400 (Sun, 20 May 2007)
New Revision: 3155
Added:
branches/tdiesler/trunk/integration/xfire/
branches/tdiesler/trunk/integration/xfire/.classpath
branches/tdiesler/trunk/integration/xfire/.project
branches/tdiesler/trunk/integration/xfire/IntegrationIssues.txt
branches/tdiesler/trunk/integration/xfire/ant-import/
branches/tdiesler/trunk/integration/xfire/ant-import/build-deploy.xml
branches/tdiesler/trunk/integration/xfire/ant-import/build-release.xml
branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
branches/tdiesler/trunk/integration/xfire/ant-import/build-thirdparty.xml
branches/tdiesler/trunk/integration/xfire/build.xml
branches/tdiesler/trunk/integration/xfire/output-eclipse/
branches/tdiesler/trunk/integration/xfire/src/
branches/tdiesler/trunk/integration/xfire/src/main/
branches/tdiesler/trunk/integration/xfire/src/main/etc/
branches/tdiesler/trunk/integration/xfire/src/main/etc/component-info.xml
branches/tdiesler/trunk/integration/xfire/src/main/java/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserJBWS.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/EndpointAssociation.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistryMBean.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ModifyWebMetaDataDeployer.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ServletResourceLoader.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/VirtualFileResourceLoader.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSEndpointServletJBWS.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandler.java
branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandlerChain.java
branches/tdiesler/trunk/integration/xfire/src/main/resources/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/jboss-web.xml
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/index.html
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/styles.css
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/
branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
branches/tdiesler/trunk/integration/xfire/src/test/
branches/tdiesler/trunk/integration/xfire/src/test/java/
branches/tdiesler/trunk/integration/xfire/src/test/resources/
branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss42.txt
branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss50.txt
branches/tdiesler/trunk/integration/xfire/version.properties
Log:
Add xfire
Added: branches/tdiesler/trunk/integration/xfire/.classpath
===================================================================
--- branches/tdiesler/trunk/integration/xfire/.classpath (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/.classpath 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
+ <classpathentry kind="lib" path="thirdparty/jaxws-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jsr181-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/FastInfoset.jar"/>
+ <classpathentry kind="lib" path="thirdparty/http.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxb-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxb-impl.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxb-xjc.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxws-rt.jar" sourcepath="thirdparty/jaxws-ri-src.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jaxws-tools.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jsr173_api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jsr250-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/saaj-impl.jar"/>
+ <classpathentry kind="lib" path="thirdparty/sjsxp.jar"/>
+ <classpathentry kind="lib" path="thirdparty/stax-ex.jar"/>
+ <classpathentry kind="lib" path="thirdparty/streambuffer.jar"/>
+ <classpathentry kind="lib" path="thirdparty/servlet-api.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/integration-spi"/>
+ <classpathentry kind="lib" path="/integration-spi/thirdparty/dom4j.jar"/>
+ <classpathentry kind="output" path="output-eclipse"/>
+</classpath>
Added: branches/tdiesler/trunk/integration/xfire/.project
===================================================================
--- branches/tdiesler/trunk/integration/xfire/.project (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/.project 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>integration-xfire</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: branches/tdiesler/trunk/integration/xfire/IntegrationIssues.txt
===================================================================
--- branches/tdiesler/trunk/integration/xfire/IntegrationIssues.txt (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/IntegrationIssues.txt 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,11 @@
+# $Id$
+
+* WSServletContextListener is final and loads sun-jaxws.xml from context classloader.
+We need to provide sun-jaxws.xml dynamically.
+
+* WSServletException is package protected
+
+* WSServlet is final
+
+* WSServletDelegate is final
+
Property changes on: branches/tdiesler/trunk/integration/xfire/IntegrationIssues.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/ant-import/build-deploy.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-deploy.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-deploy.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <!-- ================================================================== -->
+ <!-- Deployment JBoss50 -->
+ <!-- ================================================================== -->
+
+ <!-- Deploy jbossws/xfire to jboss50 -->
+ <target name="deploy-jboss50" depends="jars-jboss50,undeploy-jboss50" description="Deploy jbossws/xfire to jboss50">
+
+ <ant antfile="${int.jbws.dir}/build.xml" target="undeploy-jboss50" inheritall="false"/>
+
+ <copy todir="${jboss50.home}/client" overwrite="true">
+ <fileset dir="${thirdparty.dir}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ <include name="jaxb-xjc.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss50.home}/lib" overwrite="true">
+ <fileset dir="${thirdparty.dir}">
+ <include name="jaxb-api.jar"/>
+ <include name="jaxb-impl.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="${jboss50.home}/server/${jboss.server.instance}/lib" overwrite="true">
+ <fileset dir="${spi.dir}/output/lib">
+ <include name="jbossws-spi.jar"/>
+ </fileset>
+ </copy>
+ <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer"/>
+ <unzip dest="${jboss50.home}/server/${jboss.server.instance}/deployers/jbossws.deployer" src="${xfire.output.lib.dir}/jbossws-xfire50-deployer.zip"/>
+ <mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
+ <unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar" src="${xfire.output.lib.dir}/jbossws-xfire50.sar"/>
+ <copy tofile="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-context.war" file="${xfire.output.lib.dir}/jbossws-context.war" overwrite="true"/>
+ </target>
+
+ <!-- Remove jbossws/xfire from jboss50 -->
+ <target name="undeploy-jboss50" depends="prepare" description="Remove jbossws/xfire from jboss50">
+ <delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws-xfire.sar"/>
+ </target>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/ant-import/build-deploy.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/ant-import/build-release.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-release.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-release.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <!-- Release to jboss.local.repository -->
+ <target name="release" depends="jars"
+ description="Release to jboss.local.repository">
+
+
+ </target>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <property name="tests.dir" value="${int.xfire.dir}/src/test"/>
+ <property name="tests.output.dir" value="${int.xfire.dir}/output-tests"/>
+
+ <import file="${build.dir}/ant-import/build-testsuite.xml"/>
+
+ <!--
+ Run tests against jboss50
+ -->
+ <target name="tests-jboss50" depends="tests-prepare-jboss50,tests"/>
+ <target name="tests-prepare-jboss50">
+ <property name="jboss.home" value="${jboss50.home}"/>
+ <property name="excludesfile" value="${int.xfire.dir}/src/test/resources/excludes-jboss50.txt"/>
+ </target>
+
+ <!--
+ Run tests against jboss42
+ -->
+ <target name="tests-jboss42" depends="tests-prepare-jboss42,tests"/>
+ <target name="tests-prepare-jboss42">
+ <property name="jboss.home" value="${jboss42.home}"/>
+ <property name="excludesfile" value="${int.xfire.dir}/src/test/resources/excludes-jboss42.txt"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <!--
+ Init the various classpaths
+ -->
+ <target name="tests-init" depends="tests-prepare,thirdparty">
+
+ <path id="xfire.classpath">
+ <pathelement location="${thirdparty.dir}/FastInfoset.jar"/>
+ <pathelement location="${thirdparty.dir}/http.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxws-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxws-rt.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxws-tools.jar"/>
+ <pathelement location="${thirdparty.dir}/jsr173_api.jar"/>
+ <pathelement location="${thirdparty.dir}/jsr181-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jsr250-api.jar"/>
+ <pathelement location="${thirdparty.dir}/resolver.jar"/>
+ <pathelement location="${thirdparty.dir}/saaj-api.jar"/>
+ <pathelement location="${thirdparty.dir}/saaj-impl.jar"/>
+ <pathelement location="${thirdparty.dir}/sjsxp.jar"/>
+ <pathelement location="${thirdparty.dir}/stax-ex.jar"/>
+ <pathelement location="${thirdparty.dir}/streambuffer.jar"/>
+ </path>
+
+ <!-- The combined compile classpath -->
+ <path id="javac.classpath">
+ <path refid="xfire.classpath"/>
+ <pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
+ <pathelement location="${jboss.client}/jboss-common-core.jar"/>
+ <pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
+ <pathelement location="${jboss.server.lib}/jboss-javaee.jar"/>
+ </path>
+
+ <!-- The test client classpath -->
+ <path id="tests.client.classpath">
+ <path refid="xfire.classpath"/>
+ <pathelement location="${jboss.client}/activation.jar"/>
+ <pathelement location="${jboss.client}/jaxb-api.jar"/>
+ <pathelement location="${jboss.client}/jaxb-impl.jar"/>
+ <pathelement location="${jboss.client}/mail.jar"/>
+ <pathelement location="${jboss.server.lib}/jbosssx.jar"/>
+ <pathelement location="${jboss.client}/log4j.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ </path>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Compiling -->
+ <!-- ================================================================== -->
+
+ <target name="tests-compile" depends="tests-init" description="Compile sources">
+ <mkdir dir="${tests.output.dir}/classes"/>
+ <javac destdir="${tests.output.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}"
+ failonerror="${javac.fail.onerror}" excludesfile="${excludesfile}">
+ <src path="${testsuite.dir}/src/java"/>
+ <src path="${tests.java.dir}"/>
+ <classpath refid="javac.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Building -->
+ <!-- ================================================================== -->
+
+ <!-- Copy resources -->
+ <target name="tests-copy-resources" depends="tests-init" description="Copy the deployment resources.">
+ <copy-test-resources srcdir="${testsuite.dir}/src"/>
+ <copy-test-resources srcdir="${int.xfire.dir}/src/test"/>
+ </target>
+
+ <target name="tests-jars" depends="tests-compile,tests-copy-resources" description="Build the deployments.">
+ <ant antfile="${testsuite.dir}/ant-import/build-jars-jaxws.xml" target="build-jars-jaxws" inheritall="true"/>
+ </target>
+
+ <target name="tests-main" depends="tests-jars" description="Build the deployments."/>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/ant-import/build-testsuite.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/ant-import/build-thirdparty.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/ant-import/build-thirdparty.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/ant-import/build-thirdparty.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <property file="${int.xfire.dir}/version.properties"/>
+
+ <!-- ========= -->
+ <!-- Libraries -->
+ <!-- ========= -->
+
+ <target name="thirdparty" depends="thirdparty-get,thirdparty-classpath">
+ </target>
+
+ <target name="thirdparty-init" depends="prepare">
+ <property name="thirdparty.dir" value="${int.xfire.dir}/thirdparty"/>
+ <checksum file="${int.xfire.dir}/version.properties" fileext=".md5" verifyproperty="checksum.ok"/>
+ <condition property="force.thirdparty.get">
+ <or>
+ <not>
+ <available file="${thirdparty.dir}" type="dir"/>
+ </not>
+ <isfalse value="${checksum.ok}"/>
+ </or>
+ </condition>
+ </target>
+
+ <!--
+ thirdpartry-get
+ -->
+ <target name="thirdparty-get" depends="thirdparty-init" if="force.thirdparty.get"
+ description="Gets the thirdparty libraries">
+
+ <mkdir dir="${thirdparty.dir}"/>
+ <get src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar" dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-api.jar" dest="${thirdparty.dir}/jaxb-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-impl.jar" dest="${thirdparty.dir}/jaxb-impl.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxb/${sun-jaxb}/lib/jaxb-xjc.jar" dest="${thirdparty.dir}/jaxb-xjc.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/xfire/${xfire}/lib/xfire-all.jar" dest="${thirdparty.dir}/xfire-all.jar" usetimestamp="true" verbose="true"/>
+
+ <checksum file="${int.xfire.dir}/version.properties" fileext=".md5"/>
+ </target>
+
+ <target name="thirdparty-classpath" depends="thirdparty-init">
+
+ <!-- The compile classpath for jboss50 integration -->
+ <path id="xfire50.integration.classpath">
+ <pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
+ <pathelement location="${jboss50.lib}/dom4j.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-aop-jdk50.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-common-core.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-dependency.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-deployers.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-j2se.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-logging-spi.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-microcontainer.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-system.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-system-jmx.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-vfs.jar"/>
+ <pathelement location="${jboss50.lib}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss50.server.lib}/jboss.jar"/>
+ <pathelement location="${jboss50.server.lib}/jboss-javaee.jar"/>
+ <pathelement location="${jboss50.server.lib}/jboss-security-spi.jar"/>
+ <pathelement location="${jboss50.server.lib}/jnpserver.jar"/>
+ <pathelement location="${jboss50.server.deployers}/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
+ <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+ <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3.jar"/>
+ <pathelement location="${jboss50.server.deployers}/ejb3.deployer/jboss-ejb3x.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
+ <pathelement location="${thirdparty.dir}/servlet-api.jar"/>
+ <pathelement location="${thirdparty.dir}/xfire-all.jar"/>
+ </path>
+
+ </target>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/ant-import/build-thirdparty.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/build.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/build.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project default="main" basedir="../.." name="JBossWS-SunRI-JBoss50">
+
+ <import file="${basedir}/build/ant-import/build-setup.xml"/>
+
+ <import file="${int.xfire.dir}/ant-import/build-deploy.xml"/>
+ <import file="${int.xfire.dir}/ant-import/build-release.xml"/>
+ <import file="${int.xfire.dir}/ant-import/build-testsuite.xml"/>
+ <import file="${int.xfire.dir}/ant-import/build-thirdparty.xml"/>
+
+ <!-- ================================================================== -->
+ <!-- Setup -->
+ <!-- ================================================================== -->
+
+ <property name="xfire.dir" value="${int.xfire.dir}"/>
+ <property name="xfire.src.dir" value="${xfire.dir}/src/main"/>
+ <property name="xfire.etc.dir" value="${xfire.src.dir}/etc"/>
+ <property name="xfire.java.dir" value="${xfire.src.dir}/java"/>
+ <property name="xfire.resources.dir" value="${xfire.src.dir}/resources"/>
+ <property name="xfire.output.dir" value="${xfire.dir}/output"/>
+ <property name="xfire.output.classes.dir" value="${xfire.output.dir}/classes"/>
+ <property name="xfire.output.etc.dir" value="${xfire.output.dir}/etc"/>
+ <property name="xfire.output.lib.dir" value="${xfire.output.dir}/lib"/>
+
+ <!-- ================================================================== -->
+ <!-- Initialization -->
+ <!-- ================================================================== -->
+
+ <target name="init" depends="prepare,thirdparty">
+ <fail message="Not available: ${jboss50.available.file}" unless="jboss50.available"/>
+ <ant antfile="${int.jboss50.dir}/build.xml" target="main" inheritall="false"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Compile -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Compile everything.
+ |
+ | This target should depend on other compile-* targets for each
+ | different type of compile that needs to be performed, short of
+ | documentation compiles.
+ -->
+
+ <target name="compile" depends="init,compile-classes,compile-etc" description="Compile all source files."/>
+
+ <!-- Compile java sources -->
+ <target name="compile-classes" depends="init">
+ <mkdir dir="${xfire.output.classes.dir}"/>
+ <javac srcdir="${xfire.java.dir}" sourcepath="" destdir="${xfire.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
+ <include name="org/jboss/wsf/stack/xfire/**"/>
+ <classpath refid="xfire50.integration.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Compile etc files (manifests and such) -->
+ <target name="compile-etc" depends="init">
+ <mkdir dir="${xfire.output.etc.dir}"/>
+ <copy todir="${xfire.output.etc.dir}" filtering="yes">
+ <fileset dir="${xfire.etc.dir}">
+ <include name="component-info.xml"/>
+ </fileset>
+ <fileset dir="${build.dir}/etc">
+ <include name="default.mf"/>
+ </fileset>
+ <filterset>
+ <filter token="java.vm.version" value="${java.vm.version}"/>
+ <filter token="java.vm.vendor" value="${java.vm.vendor}"/>
+ <filter token="build.id" value="${build.id}"/>
+ <filter token="implementation.version" value="jbossws-xfire-${version.id}"/>
+ <filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${int.xfire.dir}/version.properties"/>
+ </filterset>
+ </copy>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Archives -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="jars" depends="compile,jars-jboss50" description="Builds all jar files.">
+ </target>
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="jars-jboss50" depends="compile">
+
+ <!-- Build jbossws-xfire50.jar -->
+ <mkdir dir="${xfire.output.lib.dir}"/>
+ <jar jarfile="${xfire.output.lib.dir}/jbossws-xfire50.jar" manifest="${xfire.output.etc.dir}/default.mf">
+ <fileset dir="${xfire.output.classes.dir}">
+ <include name="org/jboss/wsf/stack/xfire/**"/>
+ </fileset>
+ </jar>
+
+ <!-- Build jbossws-context.war -->
+ <war warfile="${xfire.output.lib.dir}/jbossws-context.war" webxml="${xfire.resources.dir}/jbossws-context.war/WEB-INF/web.xml">
+ <fileset dir="${xfire.resources.dir}/jbossws-context.war">
+ <include name="index.html"/>
+ <include name="styles.css"/>
+ </fileset>
+ <webinf dir="${xfire.resources.dir}/jbossws-context.war/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
+
+ <!-- Build jbosswsri.sar -->
+ <jar jarfile="${xfire.output.lib.dir}/jbossws-xfire50.sar" manifest="${xfire.output.etc.dir}/default.mf">
+ <!-- [JBAS-4379] MC beans deployed twice because of jacc service
+ <fileset dir="${xfire.output.lib.dir}">
+ <include name="jbossws-context.war"/>
+ </fileset>
+ -->
+ <fileset dir="${spi.dir}/thirdparty">
+ <include name="jaxrpc-api.jar"/>
+ </fileset>
+ <fileset dir="${thirdparty.dir}">
+ <include name="FastInfoset.jar"/>
+ <include name="http.jar"/>
+ <include name="jaxws-api.jar"/>
+ <include name="jaxws-rt.jar"/>
+ <include name="jaxws-tools.jar"/>
+ <include name="jsr173_api.jar"/>
+ <include name="jsr181-api.jar"/>
+ <include name="jsr250-api.jar"/>
+ <include name="resolver.jar"/>
+ <include name="saaj-api.jar"/>
+ <include name="saaj-impl.jar"/>
+ <include name="sjsxp.jar"/>
+ <include name="stax-ex.jar"/>
+ <include name="streambuffer.jar"/>
+ </fileset>
+ <metainf dir="${xfire.resources.dir}/jbossws-jboss50.sar/META-INF">
+ <include name="jbossws-beans.xml"/>
+ </metainf>
+ </jar>
+
+ <!-- Build jbosswsri-deployer -->
+ <zip zipfile="${xfire.output.lib.dir}/jbossws-xfire50-deployer.zip">
+ <fileset dir="${int.jboss50.dir}/output/lib">
+ <include name="jbossws-jboss50.jar"/>
+ </fileset>
+ <fileset dir="${xfire.output.lib.dir}">
+ <include name="jbossws-xfire50.jar"/>
+ </fileset>
+ <fileset dir="${xfire.resources.dir}/jbossws-jboss50.deployer">
+ <include name="META-INF/jbossws-deployer-beans.xml"/>
+ </fileset>
+ </zip>
+
+ <!-- Build jbosswsri50-src.zip -->
+ <zip zipfile="${xfire.output.lib.dir}/jbossws-xfire50-src.zip" >
+ <fileset dir="${xfire.java.dir}"/>
+ </zip>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Miscellaneous -->
+ <!-- ================================================================== -->
+
+ <target name="clean" depends="prepare" description="Cleans up most generated files.">
+ <delete dir="${xfire.output.dir}"/>
+ </target>
+
+ <target name="clobber" depends="clean" description="Cleans up all generated files.">
+ <delete dir="${int.xfire.dir}/output-tests"/>
+ <delete dir="${int.xfire.dir}/thirdparty"/>
+ </target>
+
+ <target name="main" description="Executes the default target (most)." depends="most"/>
+
+ <target name="most" description="Builds almost everything." depends="jars"/>
+
+ <target name="all" description="Create a distribution zip file" depends="most,tests-main">
+ </target>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/build.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/etc/component-info.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/etc/component-info.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/etc/component-info.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,31 @@
+<project name="jboss/jbossws-xfire50">
+
+ <component id="jboss/jbossws-xfire50"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id@"
+ licenseType="lgpl">
+
+ <artifact id="jbosswsri50.jar"/>
+ <artifact id="jbosswsri50.sar"/>
+ <artifact id="jbosswsri50-deployer.zip"/>
+ <artifact id="jbosswsri50-src.zip"/>
+
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb@"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer@"/>
+ </import>
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@jboss-jbossws-spi@"/>
+ </import>
+ <import componentref="sun-jaxws">
+ <compatible version="@sun-jaxws@"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,602 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.soap.MTOMFeature;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.xml.sax.EntityResolver;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.BindingID;
+import com.sun.xml.ws.api.WSBinding;
+import com.sun.xml.ws.api.server.Container;
+import com.sun.xml.ws.api.server.InstanceResolver;
+import com.sun.xml.ws.api.server.Invoker;
+import com.sun.xml.ws.api.server.SDDocumentSource;
+import com.sun.xml.ws.api.server.WSEndpoint;
+import com.sun.xml.ws.api.streaming.XMLStreamReaderFactory;
+import com.sun.xml.ws.binding.WebServiceFeatureList;
+import com.sun.xml.ws.handler.HandlerChainsModel;
+import com.sun.xml.ws.resources.ServerMessages;
+import com.sun.xml.ws.resources.WsservletMessages;
+import com.sun.xml.ws.server.EndpointFactory;
+import com.sun.xml.ws.server.ServerRtException;
+import com.sun.xml.ws.streaming.Attributes;
+import com.sun.xml.ws.streaming.TidyXMLStreamReader;
+import com.sun.xml.ws.streaming.XMLStreamReaderUtil;
+import com.sun.xml.ws.transport.http.HttpAdapter;
+import com.sun.xml.ws.transport.http.ResourceLoader;
+import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
+import com.sun.xml.ws.util.HandlerAnnotationInfo;
+import com.sun.xml.ws.util.exception.LocatableWebServiceException;
+import com.sun.xml.ws.util.xml.XmlUtil;
+
+/**
+ * A copy of DeploymentDescriptorParser that externalizes
+ *
+ * {@link createInvoker(Class)}
+ *
+ *
+ * @author WS Development Team
+ * @author Kohsuke Kawaguchi
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DeploymentDescriptorParserExt<A>
+{
+ private final Container container;
+ private final ClassLoader classLoader;
+ private final ResourceLoader loader;
+ private final AdapterFactory<A> adapterFactory;
+
+ /**
+ * Endpoint names that are declared.
+ * Used to catch double definitions.
+ */
+ private final Set<String> names = new HashSet<String>();
+
+ /**
+ * WSDL/schema documents collected from /WEB-INF/wsdl. Keyed by the system ID.
+ */
+ private final Map<String, SDDocumentSource> docs = new HashMap<String, SDDocumentSource>();
+
+ /**
+ *
+ * @param cl
+ * Used to load service implementations.
+ * @param loader
+ * Used to locate resources, in particular WSDL.
+ * @param container
+ * Optional {@link Container} that {@link WSEndpoint}s receive.
+ * @param adapterFactory
+ * Creates {@link HttpAdapter} (or its derived class.)
+ */
+ public DeploymentDescriptorParserExt(ClassLoader cl, ResourceLoader loader, Container container, AdapterFactory<A> adapterFactory) throws MalformedURLException
+ {
+ classLoader = cl;
+ this.loader = loader;
+ this.container = container;
+ this.adapterFactory = adapterFactory;
+
+ collectDocs("/WEB-INF/wsdl/");
+ logger.fine("war metadata=" + docs);
+ }
+
+ /**
+ * Parses the {@code sun-jaxws.xml} file and configures
+ * a set of {@link HttpAdapter}s.
+ */
+ public @NotNull
+ List<A> parse(String systemId, InputStream is)
+ {
+ XMLStreamReader reader = null;
+ try
+ {
+ reader = new TidyXMLStreamReader(XMLStreamReaderFactory.create(systemId, is, true), is);
+ XMLStreamReaderUtil.nextElementContent(reader);
+ return parseAdapters(reader);
+ }
+ finally
+ {
+ if (reader != null)
+ {
+ try
+ {
+ reader.close();
+ }
+ catch (XMLStreamException e)
+ {
+ throw new ServerRtException("runtime.parser.xmlReader", e);
+ }
+ }
+ try
+ {
+ is.close();
+ }
+ catch (IOException e)
+ {
+ // ignore
+ }
+ }
+ }
+
+ /**
+ * Parses the {@code sun-jaxws.xml} file and configures
+ * a set of {@link HttpAdapter}s.
+ */
+ public @NotNull
+ List<A> parse(File f) throws IOException
+ {
+ FileInputStream in = new FileInputStream(f);
+ try
+ {
+ return parse(f.getPath(), in);
+ }
+ finally
+ {
+ in.close();
+ }
+ }
+
+ /**
+ * Get all the WSDL & schema documents recursively.
+ */
+ private void collectDocs(String dirPath) throws MalformedURLException
+ {
+ Set<String> paths = loader.getResourcePaths(dirPath);
+ if (paths != null)
+ {
+ for (String path : paths)
+ {
+ if (path.endsWith("/"))
+ {
+ collectDocs(path);
+ }
+ else
+ {
+ URL res = loader.getResource(path);
+ docs.put(res.toString(), SDDocumentSource.create(res));
+ }
+ }
+ }
+ }
+
+ private List<A> parseAdapters(XMLStreamReader reader)
+ {
+ if (!reader.getName().equals(QNAME_ENDPOINTS))
+ {
+ failWithFullName("runtime.parser.invalidElement", reader);
+ }
+
+ List<A> adapters = new ArrayList<A>();
+
+ Attributes attrs = XMLStreamReaderUtil.getAttributes(reader);
+ String version = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_VERSION);
+ if (!version.equals(ATTRVALUE_VERSION_1_0))
+ {
+ failWithLocalName("runtime.parser.invalidVersionNumber", reader, version);
+ }
+
+ while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT)
+ if (reader.getName().equals(QNAME_ENDPOINT))
+ {
+
+ attrs = XMLStreamReaderUtil.getAttributes(reader);
+ String name = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_NAME);
+ if (!names.add(name))
+ {
+ logger.warning(WsservletMessages.SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME(/*name*/));
+ }
+
+ String implementationName = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION);
+ Class<?> implementorClass = getImplementorClass(implementationName, reader);
+ EndpointFactory.verifyImplementorClass(implementorClass);
+
+ SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass);
+
+ QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE);
+ if (serviceName == null)
+ serviceName = EndpointFactory.getDefaultServiceName(implementorClass);
+
+ QName portName = getQNameAttribute(attrs, ATTR_PORT);
+ if (portName == null)
+ portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass);
+
+ //get enable-mtom attribute value
+ String enable_mtom = getAttribute(attrs, ATTR_ENABLE_MTOM);
+ String mtomThreshold = getAttribute(attrs, ATTR_MTOM_THRESHOLD_VALUE);
+ String bindingId = getAttribute(attrs, ATTR_BINDING);
+ if (bindingId != null)
+ // Convert short-form tokens to API's binding ids
+ bindingId = getBindingIdForToken(bindingId);
+ WSBinding binding = createBinding(bindingId, implementorClass, enable_mtom, mtomThreshold);
+ String urlPattern = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_URL_PATTERN);
+
+ // TODO use 'docs' as the metadata. If wsdl is non-null it's the primary.
+
+ boolean handlersSetInDD = setHandlersAndRoles(binding, reader, serviceName, portName);
+
+ ensureNoContent(reader);
+ Invoker invoker = createInvoker(implementorClass);
+ WSEndpoint<?> endpoint = WSEndpoint.create(implementorClass, !handlersSetInDD, invoker,
+ serviceName, portName, container, binding, primaryWSDL, docs.values(), createEntityResolver(), false);
+ adapters.add(adapterFactory.createAdapter(name, urlPattern, endpoint));
+ }
+ else
+ {
+ failWithLocalName("runtime.parser.invalidElement", reader);
+ }
+ return adapters;
+ }
+
+ protected Invoker createInvoker(Class<?> implementorClass)
+ {
+ Invoker invoker = InstanceResolver.createDefault(implementorClass).createInvoker();
+ return invoker;
+ }
+
+ /**
+ * @param ddBindingId
+ * binding id explicitlyspecified in the DeploymentDescriptor or parameter
+ * @param implClass
+ * Endpoint Implementation class
+ * @param mtomEnabled
+ * represents mtom-enabled attribute in DD
+ * @param mtomThreshold
+ * threshold value specified in DD
+ * @return
+ * is returned with only MTOMFeature set resolving the various precendece rules
+ */
+ private static WSBinding createBinding(String ddBindingId, Class implClass, String mtomEnabled, String mtomThreshold)
+ {
+ // Features specified through DD
+ WebServiceFeatureList features;
+
+ MTOMFeature mtomfeature = null;
+ if (mtomEnabled != null)
+ {
+ if (mtomThreshold != null)
+ mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled), Integer.valueOf(mtomThreshold));
+ else mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled));
+ }
+
+ BindingID bindingID;
+ if (ddBindingId != null)
+ {
+ bindingID = BindingID.parse(ddBindingId);
+ features = bindingID.createBuiltinFeatureList();
+
+ if (checkMtomConflict(features.get(MTOMFeature.class), mtomfeature))
+ {
+ throw new ServerRtException(ServerMessages.DD_MTOM_CONFLICT(ddBindingId, mtomEnabled));
+ }
+ }
+ else
+ {
+ bindingID = BindingID.parse(implClass);
+ // Since bindingID is coming from implclass,
+ // mtom through Feature annotation or DD takes precendece
+
+ features = new WebServiceFeatureList();
+ if (mtomfeature != null)
+ features.add(mtomfeature); // this wins over MTOM setting in bindingID
+ features.addAll(bindingID.createBuiltinFeatureList());
+ }
+
+ return bindingID.createBinding(features.toArray());
+ }
+
+ private static boolean checkMtomConflict(MTOMFeature lhs, MTOMFeature rhs)
+ {
+ if (lhs == null || rhs == null)
+ return false;
+ return lhs.isEnabled() ^ rhs.isEnabled();
+ }
+
+ /**
+ * JSR-109 defines short-form tokens for standard binding Ids. These are
+ * used only in DD. So stand alone deployment descirptor should also honor
+ * these tokens. This method converts the tokens to API's standard
+ * binding ids
+ *
+ * @param lexical binding attribute value from DD. Always not null
+ *
+ * @return returns corresponding API's binding ID or the same lexical
+ */
+ public static @NotNull
+ String getBindingIdForToken(@NotNull
+ String lexical)
+ {
+ if (lexical.equals("##SOAP11_HTTP"))
+ {
+ return SOAPBinding.SOAP11HTTP_BINDING;
+ }
+ else if (lexical.equals("##SOAP11_HTTP_MTOM"))
+ {
+ return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
+ }
+ else if (lexical.equals("##SOAP12_HTTP"))
+ {
+ return SOAPBinding.SOAP12HTTP_BINDING;
+ }
+ else if (lexical.equals("##SOAP12_HTTP_MTOM"))
+ {
+ return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
+ }
+ else if (lexical.equals("##XML_HTTP"))
+ {
+ return HTTPBinding.HTTP_BINDING;
+ }
+ return lexical;
+ }
+
+ /**
+ * Checks the deployment descriptor or {@link @WebServiceProvider} annotation
+ * to see if it points to any WSDL. If so, returns the {@link SDDocumentSource}.
+ *
+ * @return
+ * The pointed WSDL, if any. Otherwise null.
+ */
+ private SDDocumentSource getPrimaryWSDL(XMLStreamReader xsr, Attributes attrs, Class<?> implementorClass)
+ {
+
+ String wsdlFile = getAttribute(attrs, ATTR_WSDL);
+ if (wsdlFile == null)
+ {
+ wsdlFile = EndpointFactory.getWsdlLocation(implementorClass);
+ }
+
+ if (wsdlFile != null)
+ {
+ if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR))
+ {
+ logger.warning("Ignoring wrong wsdl=" + wsdlFile + ". It should start with " + JAXWS_WSDL_DD_DIR + ". Going to generate and publish a new WSDL.");
+ return null;
+ }
+
+ URL wsdl;
+ try
+ {
+ wsdl = loader.getResource('/' + wsdlFile);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), e, xsr);
+ }
+ if (wsdl == null)
+ {
+ throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr);
+ }
+ SDDocumentSource docInfo = docs.get(wsdl.toExternalForm());
+ assert docInfo != null;
+ return docInfo;
+ }
+
+ return null;
+ }
+
+ /**
+ * Creates an {@link EntityResolver} that consults {@code /WEB-INF/jax-ws-catalog.xml}.
+ */
+ private EntityResolver createEntityResolver()
+ {
+ try
+ {
+ return XmlUtil.createEntityResolver(loader.getCatalogFile());
+ }
+ catch (MalformedURLException e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ protected String getAttribute(Attributes attrs, String name)
+ {
+ String value = attrs.getValue(name);
+ if (value != null)
+ {
+ value = value.trim();
+ }
+ return value;
+ }
+
+ protected QName getQNameAttribute(Attributes attrs, String name)
+ {
+ String value = getAttribute(attrs, name);
+ if (value == null || value.equals(""))
+ {
+ return null;
+ }
+ else
+ {
+ return QName.valueOf(value);
+ }
+ }
+
+ protected String getNonEmptyAttribute(XMLStreamReader reader, Attributes attrs, String name)
+ {
+ String value = getAttribute(attrs, name);
+ if (value != null && value.equals(""))
+ {
+ failWithLocalName("runtime.parser.invalidAttributeValue", reader, name);
+ }
+ return value;
+ }
+
+ protected String getMandatoryAttribute(XMLStreamReader reader, Attributes attrs, String name)
+ {
+ String value = getAttribute(attrs, name);
+ if (value == null)
+ {
+ failWithLocalName("runtime.parser.missing.attribute", reader, name);
+ }
+ return value;
+ }
+
+ protected String getMandatoryNonEmptyAttribute(XMLStreamReader reader, Attributes attributes, String name)
+ {
+ String value = getAttribute(attributes, name);
+ if (value == null)
+ {
+ failWithLocalName("runtime.parser.missing.attribute", reader, name);
+ }
+ else if (value.equals(""))
+ {
+ failWithLocalName("runtime.parser.invalidAttributeValue", reader, name);
+ }
+ return value;
+ }
+
+ /**
+ * Parses the handler and role information and sets it
+ * on the {@link WSBinding}.
+ * @return true if <handler-chains> element present in DD
+ * false otherwise.
+ */
+ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName)
+ {
+
+ if (XMLStreamReaderUtil.nextElementContent(reader) == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS))
+ {
+
+ return false;
+ }
+
+ HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile(reader, classLoader, serviceName, portName, binding);
+
+ binding.setHandlerChain(handlerInfo.getHandlers());
+ if (binding instanceof SOAPBinding)
+ {
+ ((SOAPBinding)binding).setRoles(handlerInfo.getRoles());
+ }
+
+ // move past </handler-chains>
+ XMLStreamReaderUtil.nextContent(reader);
+ return true;
+ }
+
+ protected static void ensureNoContent(XMLStreamReader reader)
+ {
+ if (reader.getEventType() != XMLStreamConstants.END_ELEMENT)
+ {
+ fail("runtime.parser.unexpectedContent", reader);
+ }
+ }
+
+ protected static void fail(String key, XMLStreamReader reader)
+ {
+ logger.log(Level.SEVERE, key + reader.getLocation().getLineNumber());
+ throw new ServerRtException(key, Integer.toString(reader.getLocation().getLineNumber()));
+ }
+
+ protected static void failWithFullName(String key, XMLStreamReader reader)
+ {
+ throw new ServerRtException(key, reader.getLocation().getLineNumber(), reader.getName());
+ }
+
+ protected static void failWithLocalName(String key, XMLStreamReader reader)
+ {
+ throw new ServerRtException(key, reader.getLocation().getLineNumber(), reader.getLocalName());
+ }
+
+ protected static void failWithLocalName(String key, XMLStreamReader reader, String arg)
+ {
+ throw new ServerRtException(key, reader.getLocation().getLineNumber(), reader.getLocalName(), arg);
+ }
+
+ protected Class loadClass(String name)
+ {
+ try
+ {
+ return Class.forName(name, true, classLoader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ logger.log(Level.SEVERE, e.getMessage(), e);
+ throw new ServerRtException("runtime.parser.classNotFound", name);
+ }
+ }
+
+ /**
+ * Loads the class of the given name.
+ *
+ * @param xsr
+ * Used to report the source location information if there's any error.
+ */
+ private Class getImplementorClass(String name, XMLStreamReader xsr)
+ {
+ try
+ {
+ return Class.forName(name, true, classLoader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ logger.log(Level.SEVERE, e.getMessage(), e);
+ throw new LocatableWebServiceException(ServerMessages.RUNTIME_PARSER_CLASS_NOT_FOUND(name), e, xsr);
+ }
+ }
+
+ public static final String NS_RUNTIME = "http://java.sun.com/xml/ns/jax-ws/ri/runtime";
+
+ public static final String JAXWS_WSDL_DD_DIR = "WEB-INF/wsdl";
+
+ public static final QName QNAME_ENDPOINTS = new QName(NS_RUNTIME, "endpoints");
+ public static final QName QNAME_ENDPOINT = new QName(NS_RUNTIME, "endpoint");
+
+ public static final String ATTR_VERSION = "version";
+ public static final String ATTR_NAME = "name";
+ public static final String ATTR_IMPLEMENTATION = "implementation";
+ public static final String ATTR_WSDL = "wsdl";
+ public static final String ATTR_SERVICE = "service";
+ public static final String ATTR_PORT = "port";
+ public static final String ATTR_URL_PATTERN = "url-pattern";
+ public static final String ATTR_ENABLE_MTOM = "enable-mtom";
+ public static final String ATTR_MTOM_THRESHOLD_VALUE = "mtom-threshold-value";
+ public static final String ATTR_BINDING = "binding";
+
+ public static final String ATTRVALUE_VERSION_1_0 = "2.0";
+ private static final Logger logger = Logger.getLogger(com.sun.xml.ws.util.Constants.LoggingDomain + ".server.http");
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserJBWS.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserJBWS.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserJBWS.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire;
+
+// $Id$
+
+import java.net.MalformedURLException;
+
+import javax.ejb.Stateless;
+
+import com.sun.xml.ws.api.server.Container;
+import com.sun.xml.ws.api.server.InstanceResolver;
+import com.sun.xml.ws.api.server.Invoker;
+import com.sun.xml.ws.transport.http.ResourceLoader;
+import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
+
+/**
+ * A copy of DeploymentDescriptorParser that externalizes
+ *
+ * createInvoker(Class)
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DeploymentDescriptorParserJBWS<A> extends DeploymentDescriptorParserExt<A>
+{
+ public DeploymentDescriptorParserJBWS(ClassLoader cl, ResourceLoader loader, Container container, AdapterFactory<A> adapterFactory) throws MalformedURLException
+ {
+ super(cl, loader, container, adapterFactory);
+ }
+
+ @Override
+ protected Invoker createInvoker(Class<?> implClass)
+ {
+ Invoker invoker;
+ InstanceResolver<?> resolver = InstanceResolver.createDefault(implClass);
+ if (implClass.isAnnotationPresent(Stateless.class))
+ {
+ invoker = new InvokerEJB3(resolver);
+ }
+ else
+ {
+ invoker = new InvokerJSE(resolver);
+ }
+ return invoker;
+ }
+
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/DeploymentDescriptorParserJBWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/EndpointAssociation.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/EndpointAssociation.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/EndpointAssociation.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,52 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * Associates the endpoint meta data with the current thead.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public final class EndpointAssociation
+{
+ private static final ThreadLocal<Endpoint> endpoint = new ThreadLocal<Endpoint>();
+
+ public static void setEndpoint(Endpoint ep)
+ {
+ endpoint.set(ep);
+ }
+
+ public static Endpoint getEndpoint()
+ {
+ return endpoint.get();
+ }
+
+ public static void removeEndpoint()
+ {
+ endpoint.remove();
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/EndpointAssociation.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,111 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.message.Packet;
+import com.sun.xml.ws.api.server.InstanceResolver;
+import com.sun.xml.ws.api.server.Invoker;
+import com.sun.xml.ws.api.server.WSEndpoint;
+import com.sun.xml.ws.api.server.WSWebServiceContext;
+
+/**
+ * An invoker for EJB3 endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class InvokerEJB3 extends Invoker
+{
+ private final InstanceResolver resolver;
+
+ public InvokerEJB3(InstanceResolver resolver)
+ {
+ this.resolver = resolver;
+ }
+
+ @Override
+ public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint)
+ {
+ resolver.start(wsc, endpoint);
+ }
+
+ @Override
+ public void dispose()
+ {
+ resolver.dispose();
+ }
+
+ @Override
+ public <T> T invokeProvider(@NotNull Packet p, T arg)
+ {
+ Object targetBean = resolver.resolve(p);
+ return ((Provider<T>)targetBean).invoke(arg);
+ }
+
+ @Override
+ public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ EndpointInvocation inv = invHandler.createInvocation();
+ inv.setJavaMethod(m);
+ inv.setArgs(args);
+
+ Object retObj = null;
+ try
+ {
+ invHandler.invoke(ep, null, inv);
+ retObj = inv.getReturnValue();
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ }
+
+ return retObj;
+ }
+
+ private void handleException(Exception ex) throws InvocationTargetException, IllegalAccessException
+ {
+ if (ex instanceof InvocationTargetException)
+ throw (InvocationTargetException)ex;
+
+ if (ex instanceof IllegalAccessException)
+ throw (IllegalAccessException)ex;
+
+ throw new WebServiceException(ex);
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,115 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.message.Packet;
+import com.sun.xml.ws.api.server.InstanceResolver;
+import com.sun.xml.ws.api.server.Invoker;
+import com.sun.xml.ws.api.server.WSEndpoint;
+import com.sun.xml.ws.api.server.WSWebServiceContext;
+
+/**
+ * An invoker for JSE endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class InvokerJSE extends Invoker
+{
+ private final InstanceResolver resolver;
+
+ public InvokerJSE(InstanceResolver resolver)
+ {
+ this.resolver = resolver;
+ }
+
+ @Override
+ public void start(@NotNull
+ WSWebServiceContext wsc, @NotNull
+ WSEndpoint endpoint)
+ {
+ resolver.start(wsc, endpoint);
+ }
+
+ @Override
+ public void dispose()
+ {
+ resolver.dispose();
+ }
+
+ @Override
+ public <T> T invokeProvider(@NotNull
+ Packet p, T arg)
+ {
+ Object targetBean = resolver.resolve(p);
+ return ((Provider<T>)targetBean).invoke(arg);
+ }
+
+ @Override
+ public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException
+ {
+ Endpoint ep = EndpointAssociation.getEndpoint();
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ EndpointInvocation inv = invHandler.createInvocation();
+ inv.setJavaMethod(m);
+ inv.setArgs(args);
+
+ Object retObj = null;
+ try
+ {
+ Object targetBean = resolver.resolve(p);
+ invHandler.invoke(ep, targetBean, inv);
+ retObj = inv.getReturnValue();
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ }
+
+ return retObj;
+ }
+
+ private void handleException(Exception ex) throws InvocationTargetException, IllegalAccessException
+ {
+ if (ex instanceof InvocationTargetException)
+ throw (InvocationTargetException)ex;
+
+ if (ex instanceof IllegalAccessException)
+ throw (IllegalAccessException)ex;
+
+ throw new WebServiceException(ex);
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/InvokerJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,48 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.BasicLifecycleHandler;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * A lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class LifecycleHandlerImpl extends BasicLifecycleHandler
+{
+ public void start(Endpoint ep)
+ {
+ super.start(ep);
+ log.info("WebService started: " + ep.getName());
+ }
+
+ public void stop(Endpoint ep)
+ {
+ super.stop(ep);
+ log.info("WebService stoped: " + ep.getName());
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/LifecycleHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,86 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.management.BasicEndpointRegistry;
+
+/**
+ * A Service Endpoint Registry
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 04-May-2007
+ */
+public class ManagedEndpointRegistry extends BasicEndpointRegistry implements ManagedEndpointRegistryMBean
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(ManagedEndpointRegistry.class);
+
+ public String getImplementationTitle()
+ {
+ return getClass().getPackage().getImplementationTitle();
+ }
+
+ public String getImplementationVersion()
+ {
+ return getClass().getPackage().getImplementationVersion();
+ }
+
+ public void create() throws Exception
+ {
+ log.info(getImplementationTitle());
+ log.info(getImplementationVersion());
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.registerMBean(this, OBJECT_NAME);
+ }
+ }
+
+ public void destroy() throws Exception
+ {
+ log.debug("Destroy service endpoint manager");
+ MBeanServer server = getMBeanServer();
+ if (server != null)
+ {
+ server.unregisterMBean(OBJECT_NAME);
+ }
+ }
+
+ private MBeanServer getMBeanServer()
+ {
+ MBeanServer server = null;
+ ArrayList servers = MBeanServerFactory.findMBeanServer(null);
+ if (servers.size() > 0)
+ {
+ server = (MBeanServer)servers.get(0);
+ }
+ return server;
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistryMBean.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistryMBean.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistryMBean.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire;
+
+import org.jboss.wsf.spi.management.EndpointRegistry;
+
+/**
+ * MBean interface.
+ * @since 15-April-2004
+ */
+public interface ManagedEndpointRegistryMBean extends EndpointRegistry
+{
+ String getImplementationTitle();
+
+ String getImplementationVersion();
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ManagedEndpointRegistryMBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ModifyWebMetaDataDeployer.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ModifyWebMetaDataDeployer.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ModifyWebMetaDataDeployer.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,137 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import org.jboss.metadata.Listener;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.web.ParamValue;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.metadata.web.ParamValue.ParamType;
+import org.jboss.wsf.spi.deployment.AbstractDeployer;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDEndpoints;
+
+/**
+ * A deployer that modifies the web.xml meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ModifyWebMetaDataDeployer extends AbstractDeployer
+{
+ private String listenerClass;
+ private String servletClass;
+
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+
+ public void setServletClass(String servletClass)
+ {
+ this.servletClass = servletClass;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
+ if (webMetaData != null)
+ {
+ Listener listener = new Listener();
+ listener.setListenerClass(listenerClass);
+ webMetaData.addListener(listener);
+
+ DDEndpoints ddSunJaxws = dep.getContext().getAttachment(DDEndpoints.class);
+ if (ddSunJaxws == null)
+ throw new IllegalStateException("Cannot obtain sun-jaxws meta data");
+
+ // Add the path to sun-jaxws.xml
+ ParamValue ctxParam = new ParamValue();
+ ctxParam.setType(ParamType.CONTEXT_PARAM);
+ ctxParam.setName(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL);
+ ctxParam.setValue(ddSunJaxws.createFileURL().toExternalForm());
+ webMetaData.addContextParam(ctxParam);
+
+ for (Servlet servlet : webMetaData.getServlets())
+ {
+ String orgServletClass = servlet.getServletClass();
+
+ // JSP
+ if (orgServletClass == null || orgServletClass.length() == 0)
+ {
+ log.debug("Innore servlet class: " + orgServletClass);
+ continue;
+ }
+
+ if (!isJavaxServlet(orgServletClass, dep.getClassLoader()))
+ {
+ servlet.setServletClass(servletClass);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void destroy(Deployment dep)
+ {
+ DDEndpoints ddSunJaxws = dep.getContext().getAttachment(DDEndpoints.class);
+ if (ddSunJaxws != null)
+ {
+ ddSunJaxws.destroyFileURL();
+ }
+ }
+
+ private boolean isJavaxServlet(String orgServletClass, ClassLoader loader)
+ {
+ boolean isServlet = false;
+ if (loader != null)
+ {
+ try
+ {
+ Class servletClass = loader.loadClass(orgServletClass);
+ isServlet = javax.servlet.Servlet.class.isAssignableFrom(servletClass);
+ if (isServlet == true)
+ {
+ log.info("Ignore servlet: " + orgServletClass);
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClass);
+ }
+ }
+ return isServlet;
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ModifyWebMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.NotImplementedException;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+
+import com.sun.xml.ws.transport.http.servlet.WSServlet;
+import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
+
+/**
+ * A request handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class RequestHandlerImpl implements RequestHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(RequestHandlerImpl.class);
+
+ public void handleHttpRequest(Endpoint endpoint, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
+ {
+ WSServletDelegate delegate = (WSServletDelegate)context.getAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
+ if (delegate == null)
+ throw new IllegalStateException("Cannot obtain servlet delegate");
+
+ String method = req.getMethod();
+ if (method.equals("POST"))
+ {
+ delegate.doPost(req, res, context);
+ }
+ else if (method.equals("GET"))
+ {
+ delegate.doGet(req, res, context);
+ }
+ else if (method.equals("PUT"))
+ {
+ delegate.doPut(req, res, context);
+ }
+ else if (method.equals("DELETE"))
+ {
+ delegate.doDelete(req, res, context);
+ }
+ else
+ {
+ throw new WebServiceException("Unsupported method: " + method);
+ }
+ }
+
+ public void handleRequest(Endpoint endpoint, InputStream inStream, OutputStream outStream, InvocationContext context)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void handleWSDLRequest(Endpoint endpoint, OutputStream outStream, InvocationContext context)
+ {
+ throw new NotImplementedException();
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ServletResourceLoader.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ServletResourceLoader.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ServletResourceLoader.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,65 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Set;
+
+import javax.servlet.ServletContext;
+
+import com.sun.xml.ws.transport.http.ResourceLoader;
+
+/**
+ * {@link ResourceLoader} backed by {@link ServletContext}.
+ *
+ * TDI: A copy of the original that is public
+ *
+ * @author WS Development Team
+ * @author Thomas.Diesler(a)jboss.org
+ */
+public class ServletResourceLoader implements ResourceLoader
+{
+ private final ServletContext context;
+
+ public ServletResourceLoader(ServletContext context)
+ {
+ this.context = context;
+ }
+
+ public URL getResource(String path) throws MalformedURLException
+ {
+ return context.getResource(path);
+ }
+
+ public URL getCatalogFile() throws MalformedURLException
+ {
+ return getResource("/WEB-INF/jax-ws-catalog.xml");
+ }
+
+ public Set<String> getResourcePaths(String path)
+ {
+ return context.getResourcePaths(path);
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/ServletResourceLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,56 @@
+/*
+ * 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.wsf.stack.xfire;
+
+//$Id$
+
+import org.jboss.wsf.spi.deployment.AbstractDeployer;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDEndpoint;
+import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDEndpoints;
+
+/**
+ * A deployer that generates sun-jaxws.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class SunJaxwsDeployer extends AbstractDeployer
+{
+ @Override
+ public void create(Deployment dep)
+ {
+ DDEndpoints dd = new DDEndpoints();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String epName = ep.getShortName();
+ String targetBean = ep.getTargetBean();
+ String urlPattern = ep.getURLPattern();
+
+ DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
+ log.info("Add " + ddep);
+ dd.addEndpoint(ddep);
+ }
+ dep.getContext().addAttachment(DDEndpoints.class, dd);
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/VirtualFileResourceLoader.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/VirtualFileResourceLoader.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/VirtualFileResourceLoader.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire;
+
+//$Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.virtual.VirtualFile;
+
+import com.sun.xml.ws.transport.http.ResourceLoader;
+
+/**
+ * A ResourceLoader that delegates to the VFS
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class VirtualFileResourceLoader implements ResourceLoader
+{
+ private final VirtualFile vfRoot;
+
+ public VirtualFileResourceLoader(VirtualFile vfRoot)
+ {
+ this.vfRoot = vfRoot;
+ }
+
+ public URL getResource(String path) throws MalformedURLException
+ {
+ if (path.startsWith("/"))
+ path = path.substring(1);
+
+ URL resURL = null;
+ try
+ {
+ VirtualFile vfChild = vfRoot.findChild(path);
+ resURL = vfChild.toURL();
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ return resURL;
+ }
+
+ public URL getCatalogFile() throws MalformedURLException
+ {
+ return getResource("/WEB-INF/jax-ws-catalog.xml");
+ }
+
+ public Set<String> getResourcePaths(String path)
+ {
+ if (path.startsWith("/"))
+ path = path.substring(1);
+
+ Set<String> paths = new HashSet<String>();
+ try
+ {
+ VirtualFile vfChild = vfRoot.findChild(path);
+ for (VirtualFile vf : vfChild.getChildren())
+ {
+ String name = vf.getName();
+ paths.add(name);
+ }
+ }
+ catch (Exception ex)
+ {
+ // ignore
+ }
+ return paths;
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/VirtualFileResourceLoader.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSEndpointServletJBWS.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSEndpointServletJBWS.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSEndpointServletJBWS.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,106 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.io.IOException;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.utils.ObjectNameFactory;
+
+/**
+ * The JAX-WS dispatcher servlet.
+ *
+ * @author WS Development Team
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class WSEndpointServletJBWS extends HttpServlet
+{
+ protected Endpoint endpoint;
+ protected EndpointRegistry epRegistry;
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ epRegistry = EndpointRegistryFactory.getEndpointRegistry();
+ }
+
+ public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ if (endpoint == null)
+ {
+ String contextPath = req.getContextPath();
+ initServiceEndpoint(contextPath);
+ }
+
+ try
+ {
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = (RequestHandler)endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ finally
+ {
+ EndpointAssociation.removeEndpoint();
+ }
+ }
+
+ /** Initialize the service endpoint
+ */
+ protected void initServiceEndpoint(String contextPath)
+ {
+ if (contextPath.startsWith("/"))
+ contextPath = contextPath.substring(1);
+
+ String servletName = getServletName();
+ for (ObjectName sepId : epRegistry.getEndpoints())
+ {
+ String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
+ {
+ endpoint = epRegistry.getEndpoint(sepId);
+ break;
+ }
+ }
+
+ if (endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + ","
+ + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
+ throw new WebServiceException("Cannot obtain endpoint for: " + oname);
+ }
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSEndpointServletJBWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,187 @@
+/*
+ * 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.wsf.stack.xfire;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextAttributeEvent;
+import javax.servlet.ServletContextAttributeListener;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.xml.ws.WebServiceException;
+
+import com.sun.istack.NotNull;
+import com.sun.xml.ws.api.server.BoundEndpoint;
+import com.sun.xml.ws.api.server.Container;
+import com.sun.xml.ws.api.server.Module;
+import com.sun.xml.ws.resources.WsservletMessages;
+import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapterList;
+import com.sun.xml.ws.transport.http.servlet.WSServlet;
+import com.sun.xml.ws.transport.http.servlet.WSServletDelegate;
+
+/**
+ * A copy of WSServletContextListener that externalizes
+ *
+ * getDeploymentDescriptorURL()
+ * createDeploymentDescriptorParser()
+ *
+ * @author WS Development Team
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class WSServletContextListenerExt implements ServletContextAttributeListener, ServletContextListener
+{
+ private WSServletDelegate delegate;
+
+ public void attributeAdded(ServletContextAttributeEvent event)
+ {
+ }
+
+ public void attributeRemoved(ServletContextAttributeEvent event)
+ {
+ }
+
+ public void attributeReplaced(ServletContextAttributeEvent event)
+ {
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (delegate != null)
+ { // the deployment might have failed.
+ delegate.destroy();
+ }
+
+ if (logger.isLoggable(Level.INFO))
+ {
+ logger.info(WsservletMessages.LISTENER_INFO_DESTROY());
+ }
+ }
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ if (logger.isLoggable(Level.INFO))
+ {
+ logger.info(WsservletMessages.LISTENER_INFO_INITIALIZE());
+ }
+ ServletContext context = event.getServletContext();
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ if (classLoader == null)
+ {
+ classLoader = getClass().getClassLoader();
+ }
+
+ ServletContainer container = new ServletContainer(context);
+ try
+ {
+ ServletResourceLoader resourceLoader = new ServletResourceLoader(context);
+ ServletAdapterList adapterList = new ServletAdapterList();
+
+ // Parse the descriptor file and build endpoint infos
+ DeploymentDescriptorParserExt<ServletAdapter> parser = createDeploymentDescriptorParser(classLoader, container, resourceLoader, adapterList);
+
+ URL sunJaxWsXml = getDeploymentDescriptorURL(context);
+ List<ServletAdapter> adapters = parser.parse(sunJaxWsXml.toExternalForm(), sunJaxWsXml.openStream());
+
+ delegate = new WSServletDelegate(adapters, context);
+
+ context.setAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO, delegate);
+ }
+ catch (Throwable e)
+ {
+ logger.log(Level.SEVERE, WsservletMessages.LISTENER_PARSING_FAILED(e), e);
+ context.removeAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
+ throw new WebServiceException("listener.parsingFailed", e);
+ }
+ }
+
+ /**
+ * Externalized for integration
+ */
+ protected DeploymentDescriptorParserExt<ServletAdapter> createDeploymentDescriptorParser(ClassLoader classLoader, ServletContainer container,
+ ServletResourceLoader resourceLoader, AdapterFactory<ServletAdapter> adapterList) throws MalformedURLException
+ {
+ DeploymentDescriptorParserExt<ServletAdapter> parser = new DeploymentDescriptorParserExt<ServletAdapter>(classLoader, resourceLoader, container, adapterList);
+ return parser;
+ }
+
+ /**
+ * Externalized for integration
+ */
+ protected URL getDeploymentDescriptorURL(ServletContext context) throws MalformedURLException
+ {
+ URL sunJaxWsXml = context.getResource(JAXWS_RI_RUNTIME);
+ return sunJaxWsXml;
+ }
+
+ /**
+ * Provides access to {@link ServletContext} via {@link Container}. Pipes
+ * can get ServletContext from Container and use it to load some resources.
+ */
+ static class ServletContainer extends Container
+ {
+ private final ServletContext servletContext;
+
+ private final Module module = new Module()
+ {
+ private final List<BoundEndpoint> endpoints = new ArrayList<BoundEndpoint>();
+
+ public @NotNull
+ List<BoundEndpoint> getBoundEndpoints()
+ {
+ return endpoints;
+ }
+ };
+
+ ServletContainer(ServletContext servletContext)
+ {
+ this.servletContext = servletContext;
+ }
+
+ public <T> T getSPI(Class<T> spiType)
+ {
+ if (spiType == ServletContext.class)
+ {
+ return (T)servletContext;
+ }
+ if (spiType == Module.class)
+ {
+ return spiType.cast(module);
+ }
+ return null;
+ }
+ }
+
+ protected static final String JAXWS_RI_RUNTIME = "/WEB-INF/sun-jaxws.xml";
+
+ private static final Logger logger = Logger.getLogger(com.sun.xml.ws.util.Constants.LoggingDomain + ".server.http");
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire;
+
+// $Id$
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletContext;
+import javax.xml.ws.WebServiceException;
+
+import com.sun.xml.ws.resources.WsservletMessages;
+import com.sun.xml.ws.transport.http.HttpAdapter;
+import com.sun.xml.ws.transport.http.DeploymentDescriptorParser.AdapterFactory;
+import com.sun.xml.ws.transport.http.servlet.ServletAdapter;
+
+/**
+ * Parses {@code sun-jaxws.xml} and sets up
+ * {@link HttpAdapter}s for all deployed endpoints.
+ *
+ * <p>
+ * This code is the entry point at the server side.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 18-May-2007
+ */
+public class WSServletContextListenerJBWS extends WSServletContextListenerExt
+{
+ public static final String PARAM_SUN_JAXWS_URL = "jbossws-sun-jaxws-url";
+
+ /**
+ * Fall back to the 'jbossws-sun-jaxws-url' init parameter for the URL location
+ * of sun-jaxws.xml
+ */
+ @Override
+ protected URL getDeploymentDescriptorURL(ServletContext context) throws MalformedURLException
+ {
+ URL sunJaxWsXml = super.getDeploymentDescriptorURL(context);
+ if (sunJaxWsXml == null)
+ {
+ String urlStr = context.getInitParameter(PARAM_SUN_JAXWS_URL);
+ if (urlStr != null && urlStr.length() > 0)
+ sunJaxWsXml = new URL(urlStr);
+ }
+ if (sunJaxWsXml == null)
+ throw new WebServiceException(WsservletMessages.NO_SUNJAXWS_XML(JAXWS_RI_RUNTIME));
+
+ return sunJaxWsXml;
+ }
+
+ /**
+ * Externalized for integration
+ */
+ @Override
+ protected DeploymentDescriptorParserExt<ServletAdapter> createDeploymentDescriptorParser(ClassLoader classLoader, ServletContainer container,
+ ServletResourceLoader resourceLoader, AdapterFactory<ServletAdapter> adapterList) throws MalformedURLException
+ {
+ DeploymentDescriptorParserExt<ServletAdapter> parser = new DeploymentDescriptorParserJBWS<ServletAdapter>(classLoader, resourceLoader, container, adapterList);
+ return parser;
+ }
+}
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerJBWS.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,135 @@
+/*
+ * 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.wsf.stack.xfire;
+
+import java.util.Iterator;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+import org.jboss.wsf.stack.xfire.metadata.sunjaxws.DDEndpoints;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
+
+ private String listenerClass;
+ private String servletClass;
+
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+
+ public void setServletClass(String servletClass)
+ {
+ this.servletClass = servletClass;
+ }
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+
+ Element root = webXml.getRootElement();
+
+ DDEndpoints ddSunJaxws = dep.getContext().getAttachment(DDEndpoints.class);
+ if (ddSunJaxws == null)
+ throw new IllegalStateException("Cannot obtain sun-jaxws meta data");
+
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL);
+ contextParam.addElement("param-value").addText(ddSunJaxws.createFileURL().toExternalForm());
+
+ root.addElement("listener").addElement("listener-class").addText(listenerClass);
+
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+ targetBeanName = orgServletClassName;
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,192 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire.metadata.sunjaxws;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.soap.SOAPBinding;
+
+//$Id$
+
+/**
+ * Metadata model for sun-jaxws.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DDEndpoint
+{
+ // Name of the endpoint
+ private String name;
+ // Primary wsdl file location in the WAR file.
+ private String wsdl;
+ //QName of WSDL service.
+ private QName service;
+ //QName of WSDL port.
+ private QName port;
+ // Endpoint implementation class name.
+ private String implementation;
+ // Should match <url-pattern> in web.xml
+ private String urlPattern;
+ // Binding id defined in the JAX-WS API
+ private String binding;
+ // Enables MTOM optimization.
+ private boolean enableMTOM;
+ // Optional handler chain
+ private DDHandlerChain handlerChain;
+
+ public DDEndpoint(String name, String impl, String urlPattern)
+ {
+ if (name == null || name.length() == 0)
+ throw new IllegalArgumentException("name cannot be null");
+ if (impl == null || impl.length() == 0)
+ throw new IllegalArgumentException("implementation cannot be null");
+ if (urlPattern == null || urlPattern.length() == 0)
+ throw new IllegalArgumentException("urlPattern cannot be null");
+
+ this.name = name;
+ this.implementation = impl;
+ this.urlPattern = urlPattern;
+ this.binding = SOAPBinding.SOAP11HTTP_BINDING;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getImplementation()
+ {
+ return implementation;
+ }
+
+ public String getUrlPattern()
+ {
+ return urlPattern;
+ }
+
+ public String getBinding()
+ {
+ return binding;
+ }
+
+ public void setBinding(String binding)
+ {
+ if (!SOAPBinding.SOAP11HTTP_BINDING.equals(binding) && !SOAPBinding.SOAP12HTTP_BINDING.equals(binding))
+ throw new IllegalArgumentException("Invalid binding: " + binding);
+
+ this.binding = binding;
+ }
+
+ public boolean isEnableMTOM()
+ {
+ return enableMTOM;
+ }
+
+ public void setEnableMTOM(boolean enableMTOM)
+ {
+ this.enableMTOM = enableMTOM;
+ }
+
+ public QName getPort()
+ {
+ return port;
+ }
+
+ public void setPort(QName port)
+ {
+ this.port = port;
+ }
+
+ public QName getService()
+ {
+ return service;
+ }
+
+ public void setService(QName service)
+ {
+ this.service = service;
+ }
+
+ public String getWsdl()
+ {
+ return wsdl;
+ }
+
+ public void setWsdl(String wsdl)
+ {
+ this.wsdl = wsdl;
+ }
+
+ public DDHandlerChain getHandlerChain()
+ {
+ return handlerChain;
+ }
+
+ public void setHandlerChain(DDHandlerChain handlerChain)
+ {
+ this.handlerChain = handlerChain;
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<endpoint");
+ writer.write(" name='" + name + "'");
+ writer.write(" implementation='" + implementation + "'");
+ writer.write(" url-pattern='" + urlPattern + "'");
+ if (service != null)
+ writer.write(" service='" + service + "'");
+ if (port != null)
+ writer.write(" port='" + port + "'");
+ if (wsdl != null)
+ writer.write(" wsdl='" + wsdl + "'");
+ if (binding != null)
+ writer.write(" binding='" + binding + "'");
+ writer.write(" enable-mtom='" + enableMTOM + "'");
+ writer.write(">");
+
+ if (handlerChain != null)
+ handlerChain.writeTo(writer);
+
+ writer.write("</endpoint>");
+ }
+
+ public String toString()
+ {
+ StringBuilder str = new StringBuilder("Endpoint");
+ str.append("\n name=" + name);
+ str.append("\n implementation=" + implementation);
+ str.append("\n url-pattern=" + urlPattern);
+ if (service != null)
+ str.append("\n service=" + service);
+ if (port != null)
+ str.append("\n port=" + port);
+ if (wsdl != null)
+ str.append("\n wsdl=" + wsdl);
+ if (binding != null)
+ str.append("\n binding=" + binding);
+ str.append("\n enable-mtom=" + enableMTOM);
+ return str.toString();
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,100 @@
+/*
+ * 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.wsf.stack.xfire.metadata.sunjaxws;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+//$Id$
+
+/**
+ * Metadata model for sun-jaxws.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DDEndpoints
+{
+ private List<DDEndpoint> endpoints = new ArrayList<DDEndpoint>();
+ private File tmpFile;
+
+ public List<DDEndpoint> getEndpoints()
+ {
+ return endpoints;
+ }
+
+ public void addEndpoint(DDEndpoint ep)
+ {
+ endpoints.add(ep);
+ }
+
+ public URL createFileURL()
+ {
+ destroyFileURL();
+
+ ServerConfig serverConfig = ServerConfigFactory.getInstance().getServerConfig();
+ File tmpDir = serverConfig.getServerTempDir();
+ try
+ {
+ tmpFile = File.createTempFile("jbossws-sun-jaxws", ".xml", tmpDir);
+ Writer writer = new OutputStreamWriter(new FileOutputStream(tmpFile));
+ writeTo(writer);
+ writer.close();
+
+ return tmpFile.toURL();
+ }
+ catch (IOException ex)
+ {
+ throw new WSDeploymentException(ex);
+ }
+ }
+
+ public void destroyFileURL()
+ {
+ if (tmpFile != null)
+ {
+ tmpFile.delete();
+ tmpFile = null;
+ }
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'>");
+ for (DDEndpoint ep : endpoints)
+ {
+ ep.writeTo(writer);
+ }
+ writer.write("</endpoints>");
+ }
+
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDEndpoints.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandler.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandler.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandler.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.xfire.metadata.sunjaxws;
+
+import java.io.IOException;
+import java.io.Writer;
+
+//$Id$
+
+/**
+ * Metadata model for sun-jaxws.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DDHandler
+{
+ private String handlerName;
+ private String handlerClass;
+
+ public DDHandler(String handlerName, String handlerClass)
+ {
+ this.handlerName = handlerName;
+ this.handlerClass = handlerClass;
+ }
+
+ public String getHandlerName()
+ {
+ return handlerName;
+ }
+
+ public String getHandlerClass()
+ {
+ return handlerClass;
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<handler>");
+ writer.write("<handler-name>" + handlerName + "</handler-name>");
+ writer.write("<handler-class>" + handlerClass + "</handler-class>");
+ writer.write("</handler>");
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandlerChain.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandlerChain.java (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandlerChain.java 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,74 @@
+/*
+ * 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.wsf.stack.xfire.metadata.sunjaxws;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+//$Id$
+
+/**
+ * Metadata model for sun-jaxws.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 10-May-2007
+ */
+public class DDHandlerChain
+{
+ // Name of the endpoint
+ private String name;
+
+ private List<DDHandler> handlers = new ArrayList<DDHandler>();
+
+ public DDHandlerChain(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public List<DDHandler> getEndpoints()
+ {
+ return handlers;
+ }
+
+ public void addEndpoint(DDHandler handler)
+ {
+ handlers.add(handler);
+ }
+
+ public void writeTo(Writer writer) throws IOException
+ {
+ writer.write("<handler-chain>");
+ writer.write("<handler-chain-name>" + name + "</handler-chain-name>");
+ for (DDHandler handler : handlers)
+ {
+ handler.writeTo(writer);
+ }
+ writer.write("</handler-chain>");
+ }
+}
\ No newline at end of file
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/sunri/metadata/sunjaxws/DDHandlerChain.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/jboss-web.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/jboss-web.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/jboss-web.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE jboss-web
+ PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
+
+<jboss-web>
+
+ <!--
+ <security-domain>java:/jaas/jbossws</security-domain>
+ -->
+ <context-root>jbossws</context-root>
+
+</jboss-web>
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ A web application that installs the JBossWS servlets
+
+ $Id$
+-->
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>JBossWS</display-name>
+
+ <servlet>
+ <servlet-name>ContextServlet</servlet-name>
+ <servlet-class>org.jboss.ws.core.server.ContextServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+ <servlet-class>org.jboss.ws.core.server.PortComponentLinkServlet</servlet-class>
+ </servlet>
+
+ <!-- now the mappings -->
+
+ <servlet-mapping>
+ <servlet-name>ContextServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>PortComponentLinkServlet</servlet-name>
+ <url-pattern>/pclink</url-pattern>
+ </servlet-mapping>
+
+ <!--
+ currently the W3C haven't settled on a media type for WSDL;
+ http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response
+ -->
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/index.html
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/index.html (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/index.html 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,63 @@
+<html><head>
+<meta http-equiv='Content-Type content='text/html; charset=iso-8859-1'>
+<title>JBossWS / jbossws-2.0.0.CR3 (date=200702012001)</title>
+<link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class='pageHeader'>Welcome to JBoss Web Services</div>
+
+<div class="pageSection">
+<h2>J2EE compatible web services</h2>
+JBossWS is a JAX-WS compliant web service stack developed to be part of JBoss' JavaEE5 offering.
+</div>
+
+<div class="pageSection">
+<h3>Administration</h3>
+
+<fieldset>
+ <legend><b>Runtime information</b></legend>
+<ul>
+ <li><a href="services">View a list of deployed services</a></li>
+ <!--li><a href="depends">View installed dependencies</a></li-->
+ <li><a href="/jmx-console/">Access JMX console</a></li>
+</ul>
+</fieldset>
+</div>
+
+<div class="pageSection">
+<h3>Project information</h3>
+
+<fieldset>
+ <legend><b>Documentation</b></legend>
+
+<ul>
+ <li><a href="http://labs.jboss.com/portal/jbossws/downloads">Latest download and samples</a></li>
+ <li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBWSFAQ">FAQ</a></li>
+ <li><a href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html">User guide</a></li>
+ <li><a href="http://www.jboss.org/wiki/Wiki.jsp?page=JBossWS">JBossWS WIKI</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Community</b></legend>
+<ul>
+ <li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=200">User forum</a></li>
+ <li><a href="http://www.jboss.org/index.html?module=bb&op=viewforum&f=174">Design forum</a></li>
+ <li><a href="https://lists.jboss.org/mailman/listinfo/jbossws-users">Mailing list</a></li>
+</ul>
+</fieldset>
+
+</br>
+<fieldset>
+ <legend><b>Source repository</b></legend>
+<ul>
+ <li><a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=JBWSFAQSourceRepository">Subversion repository</a></li>
+ <li><a href="http://fisheye.jboss.com/viewrep/JBossWS">Browse sources online</a></li>
+</ul>
+</fieldset>
+</div>
+
+</body>
+</html>
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/styles.css
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/styles.css (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-context.war/styles.css 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,186 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+ font-size: 14pt;
+ font-weight: BOLD;
+ color: #ffffff;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-color:#000066;
+ margin-bottom:15px;
+ padding-left:15px;
+ padding-top:5px;
+ padding-bottom:5px;
+ background-color: #aaaadd;
+ max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+ max-width: 900px;
+}
+
+.metrics
+{
+ font-size: 6pt;
+ background-color: #dddddd;
+ width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ font-weight: 600;
+ text-align: center;
+ background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+ font-family: Verdana, sans-serif;
+ font-weight: 500;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+ background-color: #dddddd;
+}
+
+/* error message */
+.error {
+ font-family: Courier New;
+ color: #990000;
+}
+
+/* error message */
+.error_trace {
+ font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+ font-weight: bold;
+}
+
+body {
+ font-family: Verdana,, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+ font-family: Verdana, sans-serif;
+ font-size: 14pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h2 {
+ font-family: Verdana, sans-serif;
+ font-size: 12pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h3 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h4 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 500;
+ color: #000066;
+}
+
+/* table desk */
+td {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+input, textarea, select, option {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+}
+
+a {
+ font-family: Verdana, sans-serif;
+ color: #0000dd;
+ text-decoration: none;
+}
+
+a:hover{
+ font-family: Verdana, sans-serif;
+ color: #cc0000;
+ text-decoration: none;
+}
+
+pre {
+ background:#dddddd
+}
\ No newline at end of file
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ A web service deployer that hooks in after the EJB deployers
+ -->
+ <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.WebServiceDeployerEJB">
+ <property name="relOrderEJB2x"><inject bean="EJB2xDeployer" property="relativeOrder"/></property>
+ <property name="relOrderEJB3"><inject bean="EJBRegistrationDeployer" property="relativeOrder"/></property>
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>EJB2xDeployer</depends>
+ <depends>EJBRegistrationDeployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in before the WAR deployer
+ -->
+ <bean name="WebServiceDeployerJSE" class="org.jboss.wsf.container.jboss50.WebServiceDeployerJSE">
+ <property name="relOrderWar"><inject bean="WarDeployer" property="relativeOrder"/></property>
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebAppParsingDeployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in after the web service WAR/EJB deployers
+ -->
+ <bean name="WebServiceMainDeployer" class="org.jboss.wsf.container.jboss50.WebServiceMainDeployer">
+ <property name="relOrderJSE"><inject bean="WebServiceDeployerJSE" property="relativeOrder"/></property>
+ <property name="relOrderEJB"><inject bean="WebServiceDeployerEJB" property="relativeOrder"/></property>
+ <install bean="MainDeployer" method="addDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="MainDeployer" method="removeDeployer">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WarDeployer</depends>
+ <depends>WebServiceDeployerEJB</depends>
+ <depends>WebServiceDeployerJSE</depends>
+ </bean>
+
+</deployment>
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig" class="org.jboss.wsf.container.jboss50.ManagedServerConfig">
+ <!--
+ The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+ element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+
+ If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
+ If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+
+ If 'webServiceHost' is not set, JBossWS uses requesters protocol host and port when rewriting the <soap:address>.
+ -->
+ <property name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
+ <!-- The registry for web service endpoints -->
+ <bean name="WSEndpointRegistry" class="org.jboss.wsf.stack.xfire.ManagedEndpointRegistry"/>
+
+ <!-- Bind Service objects in client environment context -->
+ <!-- The bean name is compiled into the server. Changeit with the next release. -->
+ <!--bean name="ServiceRefHandler" class="org.jboss.ws.core.client.ServiceRefHandlerImpl"/-->
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jboss.ws.integration.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
+
+ <!--
+ *********************************************************************************************************************
+ Web Service deployment
+
+ There are three deployers registered with the JBoss Main Deployer.
+ The order of which is important
+
+ 1) EJBDeployer < WebServiceDeployerEJB
+ 2) WebServiceDeployerJSE < WarDeployer
+ 3) WebServiceMainDeployer
+
+ Each WebServiceDeployer has a number of DeployerHooks registerd with it
+
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
+
+ - WebServiceDeployerJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
+
+ - WebServiceMainDeployer
+ - WSMainDeployerHook
+
+ Conceptually, each of these hooks implements the following pattern:
+
+ DployerHook.deploy(unit)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeployerManager.deploy(dep)
+
+ DeployerHook.undeploy(unit)
+ Deployment dep = getDeployment(unit)
+ DeployerManager.undeploy(dep)
+
+ Each deployer hook has a web service DeployerManager injected into it.
+ A web service DeployerManager maintains a list of Deployers, each of which
+ handles a single aspect of web service deployment.
+
+ Finally, each Endpoint is registered with the EndpointRegistry.
+
+ *********************************************************************************************************************
+ -->
+
+ <!--
+ Each DeploymentManger maintains a list of Deployers
+ Each Deployer handles a single aspect of web service deployment.
+ -->
+ <bean name="WSDeployerManagerJSE" class="org.jboss.wsf.spi.deployment.BasicDeployerManager">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.wsf.spi.deployment.Deployer">
+ <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+ <inject bean="WSContextRootDeployer"/>
+ <inject bean="WSURLPatternDeployer"/>
+ <inject bean="WSSunJaxwsDeployer"/>
+ <inject bean="WSModifyWebMetaDataDeployer"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSDeployerManagerEJB" class="org.jboss.wsf.spi.deployment.BasicDeployerManager">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.wsf.spi.deployment.Deployer">
+ <inject bean="WSUnifiedDeploymentInfoDeployer"/>
+ <inject bean="WSContextRootDeployer"/>
+ <inject bean="WSURLPatternDeployer"/>
+ <inject bean="WSSunJaxwsDeployer"/>
+ <inject bean="WSWebAppGeneratorDeployer"/>
+ <inject bean="WSWebAppDeployerDeployer"/>
+ </list>
+ </property>
+ </bean>
+ <bean name="WSMainDeployerManager" class="org.jboss.wsf.spi.deployment.BasicDeployerManager">
+ <property name="deployers">
+ <list class="java.util.LinkedList" elementClass="org.jboss.wsf.spi.deployment.Deployer">
+ <inject bean="WSEndpointNameDeployer"/>
+ <inject bean="WSEndpointHandlerDeployer"/>
+ <inject bean="WSEndpointRegistryDeployer"/>
+ <inject bean="WSEndpointLifecycleDeployer"/>
+ </list>
+ </property>
+ </bean>
+
+ <!--
+ The Deployers
+ Each handles a single aspect of web service deployment
+ -->
+ <bean name="WSContextRootDeployer" class="org.jboss.wsf.spi.deployment.ContextRootDeployer"/>
+ <bean name="WSEndpointHandlerDeployer" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeployer">
+ <property name="requestHandler">org.jboss.wsf.stack.xfire.RequestHandlerImpl</property>
+ <property name="lifecycleHandler">org.jboss.wsf.stack.xfire.LifecycleHandlerImpl</property>
+ <property name="invocationHandler">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>JAXWS_JSE</key><value>org.jboss.wsf.spi.invocation.InvocationHandlerJSE</value></entry>
+ <entry><key>JAXWS_EJB3</key><value>org.jboss.wsf.container.jboss50.InvocationHandlerEJB3</value></entry>
+ </map>
+ </property>
+ </bean>
+ <bean name="WSEndpointLifecycleDeployer" class="org.jboss.wsf.spi.deployment.EndpointLifecycleDeployer"/>
+ <bean name="WSEndpointNameDeployer" class="org.jboss.wsf.spi.deployment.EndpointNameDeployer"/>
+ <bean name="WSEndpointRegistryDeployer" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeployer"/>
+ <bean name="WSModifyWebMetaDataDeployer" class="org.jboss.wsf.stack.xfire.ModifyWebMetaDataDeployer">
+ <property name="listenerClass"><inject bean="WSWebAppDesciptorModifier" property="listenerClass"/></property>
+ <property name="servletClass"><inject bean="WSWebAppDesciptorModifier" property="servletClass"/></property>
+ </bean>
+ <bean name="WSSunJaxwsDeployer" class="org.jboss.wsf.stack.xfire.SunJaxwsDeployer"/>
+ <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
+ <bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
+ <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
+ <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ </bean>
+ <bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
+ <property name="mainDeployer"><inject bean="MainDeployer"/></property>
+ </bean>
+
+ <!-- Deployer helper beans -->
+ <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
+ <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.xfire.WebAppDesciptorModifierImpl">
+ <property name="listenerClass">org.jboss.wsf.stack.xfire.WSServletContextListenerJBWS</property>
+ <property name="servletClass">org.jboss.wsf.stack.xfire.WSEndpointServletJBWS</property>
+ </bean>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
+ </bean>
+
+ <!--
+ Register DeployerHooks with JBoss deployers
+ -->
+ <bean name="WSDeployerHook_JAXRPC_JSE" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookJSE">
+ <property name="deploymentClass">org.jboss.wsf.spi.deployment.BasicDeployment</property>
+ <property name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+ <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerJSE</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXRPC_EJB21" class="org.jboss.wsf.container.jboss50.JAXRPCDeployerHookEJB21">
+ <property name="deploymentClass">org.jboss.wsf.spi.deployment.BasicDeployment</property>
+ <property name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_JSE" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookJSE">
+ <property name="deploymentClass">org.jboss.wsf.spi.deployment.BasicDeployment</property>
+ <property name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property name="deployerManager"><inject bean="WSDeployerManagerJSE"/></property>
+ <install bean="WebServiceDeployerJSE" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerJSE" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerJSE</depends>
+ </bean>
+ <bean name="WSDeployerHook_JAXWS_EJB3" class="org.jboss.wsf.container.jboss50.JAXWSDeployerHookEJB3">
+ <property name="deploymentClass">org.jboss.wsf.spi.deployment.BasicDeployment</property>
+ <property name="endpointClass">org.jboss.wsf.spi.deployment.BasicEndpoint</property>
+ <property name="deployerManager"><inject bean="WSDeployerManagerEJB"/></property>
+ <install bean="WebServiceDeployerEJB" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+ <bean name="WSMainDeployerHook" class="org.jboss.wsf.container.jboss50.MainDeployerHook">
+ <property name="deployerManager"><inject bean="WSMainDeployerManager"/></property>
+ <install bean="WebServiceMainDeployer" method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceMainDeployer" method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceMainDeployer</depends>
+ </bean>
+
+</deployment>
Property changes on: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss42.txt
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss42.txt (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss42.txt 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,2 @@
+
+# Nothing to exclude
Property changes on: branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss42.txt
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss50.txt
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss50.txt (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss50.txt 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,2 @@
+
+# Nothing to exclude
Property changes on: branches/tdiesler/trunk/integration/xfire/src/test/resources/excludes-jboss50.txt
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/tdiesler/trunk/integration/xfire/version.properties
===================================================================
--- branches/tdiesler/trunk/integration/xfire/version.properties (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/version.properties 2007-05-20 11:36:59 UTC (rev 3155)
@@ -0,0 +1,13 @@
+
+# $Id: version.properties 2928 2007-04-26 10:53:56Z thomas.diesler(a)jboss.com $
+
+sunri.implementation.title=JBoss Web Services - JBossWS/SunRI
+
+# Thirdparty library versions
+jboss-jaxr=1.2.0.GA
+jboss-jbossws-spi=SNAPSHOT
+jboss-security-spi=2.0.0.Beta
+sun-jaxb=2.1.3
+sun-servlet=2.5
+xfire=1.2.6
+
18 years, 11 months
JBossWS SVN: r3154 - branches/tdiesler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 07:33:09 -0400 (Sun, 20 May 2007)
New Revision: 3154
Added:
branches/tdiesler/trunk/
Log:
Recreate userbranch
Copied: branches/tdiesler/trunk (from rev 3153, trunk)
18 years, 11 months
JBossWS SVN: r3153 - branches/tdiesler.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 07:32:46 -0400 (Sun, 20 May 2007)
New Revision: 3153
Removed:
branches/tdiesler/trunk/
Log:
Recreate userbranch
18 years, 11 months
JBossWS SVN: r3152 - trunk/integration/jbws/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 06:53:27 -0400 (Sun, 20 May 2007)
New Revision: 3152
Modified:
trunk/integration/jbws/src/main/etc/component-info-jbws42.xml
Log:
Fix jbossws-jbws42.sar
Modified: trunk/integration/jbws/src/main/etc/component-info-jbws42.xml
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jbws42.xml 2007-05-20 10:40:20 UTC (rev 3151)
+++ trunk/integration/jbws/src/main/etc/component-info-jbws42.xml 2007-05-20 10:53:27 UTC (rev 3152)
@@ -7,7 +7,7 @@
<artifact id="jbossws-jboss42.jar"/>
<artifact id="jbossws-jboss42-src.zip"/>
- <artifact id="jbossws42.sar"/>
+ <artifact id="jbossws-jbws42.sar"/>
<import componentref="jboss/jbossxb">
<compatible version="@jboss-jbossxb@"/>
18 years, 11 months
JBossWS SVN: r3151 - in trunk/integration/jbws: src/main/etc and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-20 06:40:20 -0400 (Sun, 20 May 2007)
New Revision: 3151
Added:
trunk/integration/jbws/src/main/etc/component-info-jbws42.xml
trunk/integration/jbws/src/main/etc/component-info-jbws50.xml
Removed:
trunk/integration/jbws/src/main/etc/component-info-jboss42.xml
trunk/integration/jbws/src/main/etc/component-info-jboss50.xml
Modified:
trunk/integration/jbws/ant-import/build-release.xml
Log:
Release jbossws-jbws50, jbossws-jbws42
Modified: trunk/integration/jbws/ant-import/build-release.xml
===================================================================
--- trunk/integration/jbws/ant-import/build-release.xml 2007-05-20 00:29:48 UTC (rev 3150)
+++ trunk/integration/jbws/ant-import/build-release.xml 2007-05-20 10:40:20 UTC (rev 3151)
@@ -17,38 +17,38 @@
<target name="release" depends="jars"
description="Release to jboss.local.repository">
- <!-- jboss/jbossws-jboss50 -->
+ <!-- jboss/jbossws-jbws50 -->
<property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
- <mkdir dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
- <copy todir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib" overwrite="true">
+ <mkdir dir="${jboss.repository.dir}/jbossws-jbws50/${repository.id}/lib"/>
+ <copy todir="${jboss.repository.dir}/jbossws-jbws50/${repository.id}/lib" overwrite="true">
<fileset dir="${int.jboss50.dir}/output/lib">
<include name="jbossws-jboss50.jar"/>
+ <include name="jbossws-jboss50-src.zip"/>
</fileset>
<fileset dir="${int.jbws.dir}/output/lib">
- <include name="jbossws50.sar"/>
- <include name="jbossws50-deployer.zip"/>
- <include name="jbossws50-src.zip"/>
+ <include name="jbossws-jbws50.sar"/>
+ <include name="jbossws-jbws50-deployer.zip"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml" file="${jbws.etc.dir}/component-info-jboss50.xml" filtering="true" overwrite="true">
+ <copy tofile="${jboss.repository.dir}/jbossws-jbws50/${repository.id}/component-info.xml" file="${jbws.etc.dir}/component-info-jbws50.xml" filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
</copy>
- <!-- jboss/jbossws-jboss42 -->
+ <!-- jboss/jbossws-jbws42 -->
<property name="jboss.repository.dir" value="${jboss.local.repository}/jboss"/>
- <mkdir dir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"/>
- <copy todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib" overwrite="true">
+ <mkdir dir="${jboss.repository.dir}/jbossws-jbws42/${repository.id}/lib"/>
+ <copy todir="${jboss.repository.dir}/jbossws-jbws42/${repository.id}/lib" overwrite="true">
<fileset dir="${int.jboss42.dir}/output/lib">
<include name="jbossws-jboss42.jar"/>
+ <include name="jbossws-jboss42-src.zip"/>
</fileset>
<fileset dir="${int.jbws.dir}/output/lib">
- <include name="jbossws42.sar"/>
- <include name="jbossws42-src.zip"/>
+ <include name="jbossws-jbws42.sar"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml" file="${jbws.etc.dir}/component-info-jboss42.xml" filtering="true" overwrite="true">
+ <copy tofile="${jboss.repository.dir}/jbossws-jbws42/${repository.id}/component-info.xml" file="${jbws.etc.dir}/component-info-jbws42.xml" filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
Deleted: trunk/integration/jbws/src/main/etc/component-info-jboss42.xml
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jboss42.xml 2007-05-20 00:29:48 UTC (rev 3150)
+++ trunk/integration/jbws/src/main/etc/component-info-jboss42.xml 2007-05-20 10:40:20 UTC (rev 3151)
@@ -1,30 +0,0 @@
-<project name="jboss/jbossws-jboss42">
-
- <component id="jboss/jbossws-jboss42"
- description="JBossWS an implementation of J2EE Web Services"
- version="@repository.id@"
- licenseType="lgpl">
-
- <artifact id="jbossws-jboss42.jar"/>
- <artifact id="jbossws42.sar"/>
- <artifact id="jbossws42-src.zip"/>
-
- <import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
- </import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
- </import>
- <import componentref="jboss/jbossws">
- <compatible version="@repository.id@"/>
- </import>
- <import componentref="jboss/jbossws-spi">
- <compatible version="@repository.id@"/>
- </import>
-
- <export>
- </export>
-
- </component>
-
-</project>
Deleted: trunk/integration/jbws/src/main/etc/component-info-jboss50.xml
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jboss50.xml 2007-05-20 00:29:48 UTC (rev 3150)
+++ trunk/integration/jbws/src/main/etc/component-info-jboss50.xml 2007-05-20 10:40:20 UTC (rev 3151)
@@ -1,31 +0,0 @@
-<project name="jboss/jbossws-jboss50">
-
- <component id="jboss/jbossws-jboss50"
- description="JBossWS an implementation of J2EE Web Services"
- version="@repository.id@"
- licenseType="lgpl">
-
- <artifact id="jbossws-jboss50.jar"/>
- <artifact id="jbossws50.sar"/>
- <artifact id="jbossws50-deployer.zip"/>
- <artifact id="jbossws50-src.zip"/>
-
- <import componentref="jboss/jbossxb">
- <compatible version="@jboss-jbossxb@"/>
- </import>
- <import componentref="jboss/microcontainer">
- <compatible version="@jboss-microcontainer@"/>
- </import>
- <import componentref="jboss/jbossws">
- <compatible version="@repository.id@"/>
- </import>
- <import componentref="jboss/jbossws-spi">
- <compatible version="@repository.id@"/>
- </import>
-
- <export>
- </export>
-
- </component>
-
-</project>
Copied: trunk/integration/jbws/src/main/etc/component-info-jbws42.xml (from rev 3150, trunk/integration/jbws/src/main/etc/component-info-jboss42.xml)
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jbws42.xml (rev 0)
+++ trunk/integration/jbws/src/main/etc/component-info-jbws42.xml 2007-05-20 10:40:20 UTC (rev 3151)
@@ -0,0 +1,30 @@
+<project name="jboss/jbossws-jbws42">
+
+ <component id="jboss/jbossws-jbws42"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id@"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-jboss42.jar"/>
+ <artifact id="jbossws-jboss42-src.zip"/>
+ <artifact id="jbossws42.sar"/>
+
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb@"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer@"/>
+ </import>
+ <import componentref="jboss/jbossws">
+ <compatible version="@repository.id@"/>
+ </import>
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@repository.id@"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
Copied: trunk/integration/jbws/src/main/etc/component-info-jbws50.xml (from rev 3150, trunk/integration/jbws/src/main/etc/component-info-jboss50.xml)
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jbws50.xml (rev 0)
+++ trunk/integration/jbws/src/main/etc/component-info-jbws50.xml 2007-05-20 10:40:20 UTC (rev 3151)
@@ -0,0 +1,31 @@
+<project name="jboss/jbossws-jbws50">
+
+ <component id="jboss/jbossws-jbws50"
+ description="JBossWS an implementation of J2EE Web Services"
+ version="@repository.id@"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-jboss50.jar"/>
+ <artifact id="jbossws-jboss50-src.zip"/>
+ <artifact id="jbossws-jbws50.sar"/>
+ <artifact id="jbossws-jbws50-deployer.zip"/>
+
+ <import componentref="jboss/jbossxb">
+ <compatible version="@jboss-jbossxb@"/>
+ </import>
+ <import componentref="jboss/microcontainer">
+ <compatible version="@jboss-microcontainer@"/>
+ </import>
+ <import componentref="jboss/jbossws">
+ <compatible version="@repository.id@"/>
+ </import>
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@repository.id@"/>
+ </import>
+
+ <export>
+ </export>
+
+ </component>
+
+</project>
18 years, 11 months
JBossWS SVN: r3150 - in trunk: integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50 and 13 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-19 20:29:48 -0400 (Sat, 19 May 2007)
New Revision: 3150
Added:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/WebAppDesciptorModifierImpl.java
Removed:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ServiceEndpointPublisher.java
trunk/integration/spi/src/main/java/org/jboss/wsintegration/
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeployer.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeployerDeployer.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java
trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
trunk/integration/spi/.classpath
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/IOUtils.java
trunk/integration/sunri/ant-import/build-thirdparty.xml
trunk/integration/sunri/build.xml
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
trunk/jbossws-core/.classpath
trunk/jbossws-core/ant-import/build-thirdparty.xml
Log:
Add support for EJB3 endpoints for SunRI
Deleted: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -1,87 +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.wsf.container.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.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.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(UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
- {
- udi.addAttachment(ApplicationMetaData.class, apmd);
-
- UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
- buildUnifiedBeanMetaData(umd, apmd);
- umd.setConfigName(apmd.getConfigName());
- umd.setConfigFile(apmd.getConfigFile());
- umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
- umd.setSecurityDomain(apmd.getSecurityDomain());
- umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
- return umd;
- }
-
- protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData apmd)
- {
- return new PublishLocationAdapter ()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return apmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- protected void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, ApplicationMetaData metaData)
- {
- List<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
- Iterator it = metaData.getEnterpriseBeans();
- while (it.hasNext())
- {
- BeanMetaData bmd = (BeanMetaData)it.next();
- UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
- if (ubmd != null)
- {
- beans.add(ubmd);
- }
- }
- umd.setEnterpriseBeans(beans);
- }
-
- protected abstract UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
-}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapter.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -23,14 +23,22 @@
// $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.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedSessionMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
/**
* Build container independent application meta data
@@ -38,10 +46,53 @@
* @author Thomas.Diesler(a)jboss.org
* @since 05-May-2006
*/
-public class ApplicationMetaDataAdapter extends AbstractApplicationMetaDataAdapter
+public class ApplicationMetaDataAdapter
{
- protected UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi, ApplicationMetaData apmd)
{
+ udi.addAttachment(ApplicationMetaData.class, apmd);
+
+ UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+ buildUnifiedBeanMetaData(umd, apmd);
+ umd.setConfigName(apmd.getConfigName());
+ umd.setConfigFile(apmd.getConfigFile());
+ umd.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+ umd.setSecurityDomain(apmd.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+
+ udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ 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)
{
Added: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java (rev 0)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.deployment.WSDeploymentException;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Apr-2007
+ */
+public class ApplicationMetaDataAdaptorEJB3
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ApplicationMetaDataAdaptorEJB3.class);
+
+ public static UnifiedApplicationMetaData buildUnifiedApplicationMetaData(UnifiedDeploymentInfo udi)
+ {
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
+
+ ArrayList<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
+ for (Object container : ejb3Module.getContainers().values())
+ {
+ if (container instanceof StatelessContainer)
+ {
+ StatelessContainer slc = (StatelessContainer)container;
+ UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
+ uslc.setEjbName(slc.getEjbName());
+ uslc.setEjbClass(slc.getBeanClassName());
+ beans.add(uslc);
+ }
+ }
+
+ UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
+ umd.setEnterpriseBeans(beans);
+
+ udi.addAttachment(UnifiedApplicationMetaData.class, umd);
+ return umd;
+ }
+
+ static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
+ if (ejb3Module == null)
+ throw new WSDeploymentException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSDeploymentException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+}
Property changes on: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdaptorEJB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -26,25 +26,13 @@
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.ArrayList;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
import org.jboss.deployment.DeploymentInfo;
-import org.jboss.ejb3.Ejb3ModuleMBean;
-import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.logging.Logger;
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.WebMetaData;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanProxyCreationException;
-import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.WSDeploymentException;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
/**
* Build container independent deployment info.
@@ -57,21 +45,8 @@
// logging support
private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
- private WebMetaDataAdapter webMetaDataAdapter;
- private AbstractApplicationMetaDataAdapter appMetaDataAdapter;
-
- public void setAppMetaDataAdapter(AbstractApplicationMetaDataAdapter applicationMetaDataAdapter)
+ public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
{
- this.appMetaDataAdapter = applicationMetaDataAdapter;
- }
-
- public void setWebMetaDataAdapter(WebMetaDataAdapter webMetaDataAdapter)
- {
- this.webMetaDataAdapter = webMetaDataAdapter;
- }
-
- public UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi, DeploymentInfo di)
- {
udi.addAttachment(DeploymentInfo.class, di);
if (di.parent != null)
@@ -93,7 +68,7 @@
return udi;
}
- private URL getDeploymentURL(DeploymentInfo di)
+ private static URL getDeploymentURL(DeploymentInfo di)
{
URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
if ("file".equals(deploymentURL.getProtocol()))
@@ -114,55 +89,21 @@
return deploymentURL;
}
- private void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
+ private static void buildMetaData(UnifiedDeploymentInfo udi, Object metaData)
{
if (metaData instanceof WebMetaData)
{
- udi.metaData = webMetaDataAdapter.buildUnifiedWebMetaData(udi, (WebMetaData)metaData);
+ udi.metaData = WebMetaDataAdapter.buildUnifiedWebMetaData(udi, (WebMetaData)metaData);
udi.webappURL = udi.url;
}
else if (metaData instanceof ApplicationMetaData)
{
- udi.metaData = appMetaDataAdapter.buildUnifiedApplicationMetaData(udi, (ApplicationMetaData)metaData);
+ udi.metaData = ApplicationMetaDataAdapter.buildUnifiedApplicationMetaData(udi, (ApplicationMetaData)metaData);
}
else if (udi.deployedObject != null)
{
- Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
-
- ArrayList<UnifiedBeanMetaData> beans = new ArrayList<UnifiedBeanMetaData>();
- for (Object container : ejb3Module.getContainers().values())
- {
- if (container instanceof StatelessContainer)
- {
- StatelessContainer slc = (StatelessContainer)container;
- UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
- uslc.setEjbName(slc.getEjbName());
- uslc.setEjbClass(slc.getBeanClassName());
- beans.add(uslc);
- }
- }
-
- UnifiedApplicationMetaData appMetaData = new UnifiedApplicationMetaData();
- appMetaData.setEnterpriseBeans(beans);
- udi.metaData = appMetaData;
+ udi.metaData = ApplicationMetaDataAdaptorEJB3.buildUnifiedApplicationMetaData(udi);
+ ;
}
}
-
- public static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
- {
- Ejb3ModuleMBean ejb3Module;
- try
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName, server);
- if (ejb3Module == null)
- throw new WSDeploymentException("Cannot obtain EJB3 module: " + objectName);
-
- return ejb3Module;
- }
- catch (MBeanProxyCreationException ex)
- {
- throw new WSDeploymentException("Cannot obtain proxy to EJB3 module");
- }
- }
}
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -59,7 +59,7 @@
Service service = dep.getService();
- Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.getEJB3Module(unit.deployedObject);
+ Ejb3ModuleMBean ejb3Module = ApplicationMetaDataAdaptorEJB3.getEJB3Module(unit.deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof EJBContainer)
@@ -90,7 +90,7 @@
boolean isWebserviceDeployment = false;
// Check if the ejb3 contains annotated endpoints
- Ejb3ModuleMBean ejb3Module = DeploymentInfoAdapter.getEJB3Module(unit.deployedObject);
+ Ejb3ModuleMBean ejb3Module = ApplicationMetaDataAdaptorEJB3.getEJB3Module(unit.deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof EJBContainer)
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ModifyWebMetaDataDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -26,9 +26,9 @@
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.ServiceEndpointPublisher;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
-import org.jboss.wsf.spi.deployment.ServiceEndpointPublisher.RewriteResults;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+import org.jboss.wsf.spi.deployment.WebXMLRewriter;
/**
* A deployer that modifies the web.xml meta data
@@ -38,11 +38,11 @@
*/
public class ModifyWebMetaDataDeployer extends AbstractDeployer
{
- private ServiceEndpointPublisher serviceEndpointPublisher;
+ private WebXMLRewriter webXMLRewriter;
- public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
{
- this.serviceEndpointPublisher = serviceEndpointPublisher;
+ this.webXMLRewriter = serviceEndpointPublisher;
}
public void create(Deployment dep)
@@ -51,7 +51,7 @@
if (udi == null)
throw new IllegalStateException("Cannot obtain unified deployement info");
- RewriteResults results = serviceEndpointPublisher.rewriteWebXml(udi);
+ WebAppDesciptorModifier.RewriteResults results = webXMLRewriter.rewriteWebXml(dep);
// The endpoint may not have a target bean when
// <servlet-class> originally contained a javax.servlet.Servlet
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -40,13 +40,6 @@
*/
public class UnifiedDeploymentInfoDeployer extends AbstractDeployer
{
- private DeploymentInfoAdapter deploymentInfoAdapter;
-
- public void setDeploymentInfoAdapter(DeploymentInfoAdapter deploymentInfoAdapter)
- {
- this.deploymentInfoAdapter = deploymentInfoAdapter;
- }
-
@Override
public void create(Deployment dep)
{
@@ -61,13 +54,13 @@
if (type.toString().startsWith("JAXWS"))
{
udi = new JAXWSDeployment(type);
- deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
}
else
{
WebservicesMetaData wsMetaData = dep.getContext().getAttachment(WebservicesMetaData.class);
udi = new JAXRPCDeployment(type, wsMetaData);
- deploymentInfoAdapter.buildDeploymentInfo(udi, unit);
+ DeploymentInfoAdapter.buildDeploymentInfo(udi, unit);
}
dep.getContext().addAttachment(UnifiedDeploymentInfo.class, udi);
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebAppDeployerDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -35,7 +35,7 @@
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.ServiceEndpointPublisher;
+import org.jboss.wsf.spi.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.WSDeploymentException;
@@ -50,11 +50,11 @@
// provide logging
private static Logger log = Logger.getLogger(WebAppDeployerDeployer.class);
- private ServiceEndpointPublisher serviceEndpointPublisher;
+ private WebXMLRewriter webXMLRewriter;
- public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
{
- this.serviceEndpointPublisher = serviceEndpointPublisher;
+ this.webXMLRewriter = serviceEndpointPublisher;
}
public void create(Deployment dep)
@@ -72,7 +72,7 @@
if (di == null)
throw new IllegalStateException("Cannot obtain DeploymentInfo from context");
- serviceEndpointPublisher.rewriteWebXml(udi);
+ webXMLRewriter.rewriteWebXml(dep);
// Preserve the repository config
DeploymentInfo auxdi = new DeploymentInfo(warURL, null, MBeanServerLocator.locateJBoss());
Modified: trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
===================================================================
--- trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -47,7 +47,7 @@
*/
public class WebMetaDataAdapter
{
- public UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, WebMetaData webMetaData)
+ public static UnifiedWebMetaData buildUnifiedWebMetaData(UnifiedDeploymentInfo udi, WebMetaData webMetaData)
{
udi.addAttachment(WebMetaData.class, webMetaData);
@@ -61,10 +61,11 @@
umd.setPublishLocationAdapter(getPublishLocationAdpater(webMetaData));
umd.setSecurityMetaData(getSecurityMetaData(webMetaData.getSecurityContraints()));
+ udi.addAttachment(UnifiedWebMetaData.class, umd);
return umd;
}
- private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+ private static PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
{
return new PublishLocationAdapter()
{
@@ -75,7 +76,7 @@
};
}
- private List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
+ private static List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator securityConstraints)
{
ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new ArrayList<UnifiedWebSecurityMetaData>();
@@ -104,7 +105,7 @@
return unifiedsecurityMetaData;
}
- private Map<String, String> getServletClassMap(WebMetaData wmd)
+ private static Map<String, String> getServletClassMap(WebMetaData wmd)
{
Map<String, String> mappings = new HashMap<String, String>();
Iterator it = wmd.getServletClassMap().entrySet().iterator();
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptor.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -64,6 +64,8 @@
buildUnifiedBeanMetaData(umd, appMetaData);
buildWebservicesMetaData(umd, appMetaData);
umd.setSecurityDomain(appMetaData.getSecurityDomain());
+
+ udi.addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdaptorEJB3.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -67,6 +67,8 @@
UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
buildUnifiedBeanMetaData(umd, ejb3Deployment);
buildWebservicesMetaData(umd, jarDD);
+
+ udi.addAttachment(UnifiedApplicationMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -56,8 +56,6 @@
public void create(Endpoint ep)
{
- super.create(ep);
-
String ejbName = ep.getName().getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
if (ejbName == null)
throw new WebServiceException("Cannot obtain ejb-link");
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeployer.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ModifyWebMetaDataDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -42,11 +42,6 @@
{
private String servletClass;
- public String getServletClass()
- {
- return servletClass;
- }
-
public void setServletClass(String servletClass)
{
this.servletClass = servletClass;
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeployerDeployer.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeployerDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebAppDeployerDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -36,7 +36,7 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.ServiceEndpointPublisher;
+import org.jboss.wsf.spi.deployment.WebXMLRewriter;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
import org.jboss.wsf.spi.deployment.WSDeploymentException;
@@ -52,7 +52,7 @@
private static Logger log = Logger.getLogger(WebAppDeployerDeployer.class);
private MainDeployer mainDeployer;
- private ServiceEndpointPublisher serviceEndpointPublisher;
+ private WebXMLRewriter webXMLRewriter;
private Map<String, DeploymentContext> contextMap = new HashMap<String, DeploymentContext>();
public void setMainDeployer(MainDeployer mainDeployer)
@@ -60,9 +60,9 @@
this.mainDeployer = mainDeployer;
}
- public void setServiceEndpointPublisher(ServiceEndpointPublisher serviceEndpointPublisher)
+ public void setWebXMLRewriter(WebXMLRewriter serviceEndpointPublisher)
{
- this.serviceEndpointPublisher = serviceEndpointPublisher;
+ this.webXMLRewriter = serviceEndpointPublisher;
}
public void create(Deployment dep)
@@ -76,7 +76,7 @@
log.debug("publishServiceEndpoint: " + warURL);
try
{
- serviceEndpointPublisher.rewriteWebXml(udi);
+ webXMLRewriter.rewriteWebXml(dep);
DeploymentContext context = createDeploymentContext(warURL);
mainDeployer.addDeploymentContext(context);
Modified: trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java
===================================================================
--- trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdaptor.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -36,6 +36,7 @@
import org.jboss.metadata.web.Servlet;
import org.jboss.metadata.web.ServletMapping;
import org.jboss.wsf.spi.deployment.UnifiedDeploymentInfo;
+import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
@@ -64,6 +65,7 @@
umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
+ udi.addAttachment(UnifiedWebMetaData.class, umd);
return umd;
}
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -141,13 +141,11 @@
<bean name="WSEndpointRegistryDeployer" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeployer"/>
<bean name="WSEventingDeployer" class="org.jboss.wsf.stack.jbws.EventingDeployer"/>
<bean name="WSModifyWebMetaDataDeployer" class="org.jboss.wsf.container.jboss42.ModifyWebMetaDataDeployer">
- <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
</bean>
<bean name="WSPublishContractDeployer" class="org.jboss.wsf.stack.jbws.PublishContractDeployer"/>
<bean name="WSServiceEndpointInvokerDeployer" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeployer"/>
- <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss42.UnifiedDeploymentInfoDeployer">
- <property name="deploymentInfoAdapter"><inject bean="WSDeploymentInfoAdapter"/></property>
- </bean>
+ <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss42.UnifiedDeploymentInfoDeployer"/>
<bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeployer"/>
<bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
@@ -156,21 +154,18 @@
<property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss42.WebAppDeployerDeployer">
- <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
</bean>
<!-- Deployer helper beans -->
<bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB21"/>
<bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB3"/>
- <bean name="WSServiceEndpointPublisher" class="org.jboss.wsf.spi.deployment.ServiceEndpointPublisher">
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.jbws.WebAppDesciptorModifierImpl">
<property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
</bean>
- <bean name="WSDeploymentInfoAdapter" class="org.jboss.wsf.container.jboss42.DeploymentInfoAdapter">
- <property name="appMetaDataAdapter"><inject bean="WSAppMetaDataAdapter"/></property>
- <property name="webMetaDataAdapter"><inject bean="WSWebMetaDataAdapter"/></property>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
</bean>
- <bean name="WSAppMetaDataAdapter" class="org.jboss.wsf.container.jboss42.ApplicationMetaDataAdapter"/>
- <bean name="WSWebMetaDataAdapter" class="org.jboss.wsf.container.jboss42.WebMetaDataAdapter"/>
<!--
Register DeployerHooks with JBoss deployers
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -153,7 +153,7 @@
<bean name="WSEndpointRegistryDeployer" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeployer"/>
<bean name="WSEventingDeployer" class="org.jboss.wsf.stack.jbws.EventingDeployer"/>
<bean name="WSModifyWebMetaDataDeployer" class="org.jboss.wsf.container.jboss50.ModifyWebMetaDataDeployer">
- <property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
+ <property name="servletClass"><inject bean="WSWebAppDesciptorModifier" property="servletClass"/></property>
</bean>
<bean name="WSPublishContractDeployer" class="org.jboss.wsf.stack.jbws.PublishContractDeployer"/>
<bean name="WSServiceEndpointInvokerDeployer" class="org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeployer"/>
@@ -166,16 +166,19 @@
<property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
- <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
</bean>
<!-- Deployer helper beans -->
<bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
<bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
- <bean name="WSServiceEndpointPublisher" class="org.jboss.wsf.spi.deployment.ServiceEndpointPublisher">
- <property name="servletClass"><inject bean="WSModifyWebMetaDataDeployer" property="servletClass"/></property>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.jbws.WebAppDesciptorModifierImpl">
+ <property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
</bean>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
+ </bean>
<!--
Register DeployerHooks with JBoss deployers
Modified: trunk/integration/spi/.classpath
===================================================================
--- trunk/integration/spi/.classpath 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/spi/.classpath 2007-05-20 00:29:48 UTC (rev 3150)
@@ -6,7 +6,7 @@
<classpathentry kind="lib" path="thirdparty/jboss-common-core.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-container.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-dependency.jar"/>
- <classpathentry kind="lib" path="thirdparty/jboss-deployers.jar"/>
+ <classpathentry kind="lib" path="thirdparty/jboss-deployers.jar" sourcepath="thirdparty/jboss-deployers-src.zip"/>
<classpathentry kind="lib" path="thirdparty/jboss-logging-log4j.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jboss-microcontainer.jar"/>
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ContextRootDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -40,7 +40,8 @@
String contextRoot = null;
// #1 Use the explicit context root from the web meta data
- UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ UnifiedWebMetaData webMetaData = udi.getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
contextRoot = webMetaData.getContextRoot();
@@ -64,7 +65,6 @@
// #3 Use the implicit context root derived from the deployment name
if (contextRoot == null)
{
- UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
String name = udi.simpleName;
contextRoot = name.substring(0, name.length() - 4);
if (udi.parent != null)
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ServiceEndpointPublisher.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ServiceEndpointPublisher.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ServiceEndpointPublisher.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -1,261 +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.wsf.spi.deployment;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.utils.DOMUtils;
-import org.jboss.wsf.spi.utils.DOMWriter;
-import org.jboss.wsf.spi.utils.IOUtils;
-import org.w3c.dom.Element;
-
-/**
- * The publisher for web service endpoints
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2006
- */
-public class ServiceEndpointPublisher
-{
- // logging support
- private static Logger log = Logger.getLogger(ServiceEndpointPublisher.class);
-
- // The configured service endpoint servlet
- private String servletClass;
-
- // The results of the URL rewriting
- public class RewriteResults
- {
- // The URL to the rewrittn web.xml
- public URL webXML;
- // Maps the servlet name to the target bean
- public Map<String, String> sepTargetMap = new HashMap<String, String>();
- }
-
- public String getServletClass()
- {
- return servletClass;
- }
-
- public void setServletClass(String servletClass)
- {
- this.servletClass = servletClass;
- }
-
- public RewriteResults rewriteWebXml(UnifiedDeploymentInfo udi)
- {
- URL warURL = udi.webappURL;
- File warFile = new File(warURL.getFile());
- if (warFile.isDirectory() == false)
- throw new WebServiceException("Expected a war directory: " + warURL);
-
- File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
- if (webXML.isFile() == false)
- throw new WebServiceException("Cannot find web.xml: " + webXML);
-
- try
- {
- // After redeployment there might be a stale copy of the original web.xml.org, we delete it
- File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
- orgWebXML.delete();
-
- // Rename the web.xml
- if (webXML.renameTo(orgWebXML) == false)
- throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
-
- FileInputStream stream = new FileInputStream(orgWebXML);
- return rewriteWebXml(stream, webXML, udi.classLoader);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- }
-
- private RewriteResults rewriteWebXml(InputStream source, File dest, ClassLoader loader) throws Exception
- {
- if (dest == null)
- {
- dest = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
- dest.deleteOnExit();
- }
-
- Element root = DOMUtils.parse(source);
- RewriteResults results = modifyServletConfig(root, loader);
- results.webXML = dest.toURL();
-
- FileOutputStream fos = new FileOutputStream(dest);
- new DOMWriter(fos).setPrettyprint(true).print(root);
- fos.flush();
- fos.close();
-
- return results;
- }
-
- private RewriteResults modifyServletConfig(Element root, ClassLoader loader) throws ClassNotFoundException
- {
- RewriteResults results = new RewriteResults();
- Iterator itServlets = DOMUtils.getChildElements(root, "servlet");
- while (itServlets.hasNext())
- {
- Element servletElement = (Element)itServlets.next();
- String linkName = DOMUtils.getTextContent(DOMUtils.getFirstChildElement(servletElement, "servlet-name"));
-
- // find the servlet-class
- Element classElement = DOMUtils.getFirstChildElement(servletElement, "servlet-class");
-
- // JSP
- if (classElement == null)
- continue;
-
- String orgServletClassName = DOMUtils.getTextContent(classElement).trim();
-
- // Get the servlet class
- Class orgServletClass = null;
- if (loader != null)
- {
- try
- {
- orgServletClass = loader.loadClass(orgServletClassName);
- }
- catch (ClassNotFoundException ex)
- {
- log.warn("Cannot load servlet class: " + orgServletClassName);
- }
- }
-
- String targetBeanName = null;
-
- // Nothing to do if we have an <init-param>
- if (isAlreadyModified(servletElement))
- {
- Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
- while (itParams.hasNext())
- {
- Element elParam = (Element)itParams.next();
- Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
- Element elParamValue = DOMUtils.getFirstChildElement(elParam, "param-value");
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
- {
- targetBeanName = DOMUtils.getTextContent(elParamValue);
- }
- }
- }
- else
- {
- // Check if it is a real servlet that we can ignore
- if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
- {
- log.info("Ignore servlet: " + orgServletClassName);
- continue;
- }
- else if (orgServletClassName.endsWith("Servlet"))
- {
- log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
- continue;
- }
-
- // build a list of detached elements that come after <servlet-class>
- boolean startDetach = false;
- List<Element> detachedElements = new ArrayList<Element>();
- Iterator itDetached = DOMUtils.getChildElements(servletElement);
- while (itDetached.hasNext())
- {
- Element el = (Element)itDetached.next();
- if (startDetach == true)
- {
- detachedElements.add(el);
- servletElement.removeChild(el);
- }
- if (el.equals(classElement))
- {
- servletElement.removeChild(el);
- startDetach = true;
- }
- }
-
- // replace the class name
- classElement = (Element)DOMUtils.createElement("servlet-class");
- classElement.appendChild(DOMUtils.createTextNode(servletClass));
- classElement = (Element)servletElement.getOwnerDocument().importNode(classElement, true);
- servletElement.appendChild(classElement);
-
- // add additional init params
- if (orgServletClassName.equals(servletClass) == false)
- {
- Element paramElement = DOMUtils.createElement("init-param");
- paramElement.appendChild(DOMUtils.createElement("param-name")).appendChild(DOMUtils.createTextNode(Endpoint.SEPID_DOMAIN_ENDPOINT));
- paramElement.appendChild(DOMUtils.createElement("param-value")).appendChild(DOMUtils.createTextNode(orgServletClassName));
- paramElement = (Element)servletElement.getOwnerDocument().importNode(paramElement, true);
- servletElement.appendChild(paramElement);
- targetBeanName = orgServletClassName;
- }
-
- // reattach the elements
- itDetached = detachedElements.iterator();
- while (itDetached.hasNext())
- {
- Element el = (Element)itDetached.next();
- servletElement.appendChild(el);
- }
- }
-
- if (targetBeanName == null)
- throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
-
- // remember the target bean name
- results.sepTargetMap.put(linkName, targetBeanName.trim());
- }
-
- return results;
- }
-
- // Return true if the web.xml is already modified
- private boolean isAlreadyModified(Element servletElement)
- {
- Iterator itParams = DOMUtils.getChildElements(servletElement, "init-param");
- while (itParams.hasNext())
- {
- Element elParam = (Element)itParams.next();
- Element elParamName = DOMUtils.getFirstChildElement(elParam, "param-name");
- if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(DOMUtils.getTextContent(elParamName)))
- return true;
- }
- return false;
- }
-}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/URLPatternDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -49,7 +49,8 @@
String urlPattern = null;
// #1 For JSE lookup the url-pattern from the servlet mappings
- UnifiedWebMetaData webMetaData = dep.getContext().getAttachment(UnifiedWebMetaData.class);
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+ UnifiedWebMetaData webMetaData = udi.getAttachment(UnifiedWebMetaData.class);
if (webMetaData != null)
{
String epName = ep.getShortName();
Added: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -0,0 +1,48 @@
+/*
+ * 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.wsf.spi.deployment;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.dom4j.Document;
+
+/**
+ * Modifies the web app according to the stack requirements.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public interface WebAppDesciptorModifier
+{
+ // The results of the URL rewriting
+ public class RewriteResults
+ {
+ // The URL to the rewrittn web.xml
+ public URL webXML;
+ // Maps the servlet name to the target bean
+ public Map<String, String> sepTargetMap = new HashMap<String, String>();
+ }
+
+ RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException;
+}
\ No newline at end of file
Property changes on: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebAppDesciptorModifier.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java (from rev 3149, trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/ServiceEndpointPublisher.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java (rev 0)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/WebXMLRewriter.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -0,0 +1,117 @@
+/*
+ * 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.wsf.spi.deployment;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.URL;
+
+import javax.xml.ws.WebServiceException;
+
+import org.dom4j.Document;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier.RewriteResults;
+import org.jboss.wsf.spi.utils.IOUtils;
+
+/**
+ * The rewriter for web.xml
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2007
+ */
+public class WebXMLRewriter
+{
+ private WebAppDesciptorModifier desciptorModifier;
+
+ public WebAppDesciptorModifier getDesciptorModifier()
+ {
+ return desciptorModifier;
+ }
+
+ public void setDesciptorModifier(WebAppDesciptorModifier desciptorModifier)
+ {
+ this.desciptorModifier = desciptorModifier;
+ }
+
+ public RewriteResults rewriteWebXml(Deployment dep)
+ {
+ UnifiedDeploymentInfo udi = dep.getContext().getAttachment(UnifiedDeploymentInfo.class);
+
+ URL warURL = udi.webappURL;
+ File warFile = new File(warURL.getFile());
+ if (warFile.isDirectory() == false)
+ throw new WebServiceException("Expected a war directory: " + warURL);
+
+ File webXML = new File(warURL.getFile() + "/WEB-INF/web.xml");
+ if (webXML.isFile() == false)
+ throw new WebServiceException("Cannot find web.xml: " + webXML);
+
+ try
+ {
+ // After redeployment there might be a stale copy of the original web.xml.org, we delete it
+ File orgWebXML = new File(webXML.getCanonicalPath() + ".org");
+ orgWebXML.delete();
+
+ // Rename the web.xml
+ if (webXML.renameTo(orgWebXML) == false)
+ throw new WebServiceException("Cannot rename web.xml: " + orgWebXML);
+
+ FileInputStream stream = new FileInputStream(orgWebXML);
+ return rewriteWebXml(stream, webXML, dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception e)
+ {
+ throw new WebServiceException(e);
+ }
+ }
+
+ private RewriteResults rewriteWebXml(InputStream source, File destFile, Deployment dep) throws Exception
+ {
+ if (destFile == null)
+ {
+ destFile = File.createTempFile("jbossws-alt-web", "xml", IOUtils.createTempDirectory());
+ destFile.deleteOnExit();
+ }
+
+ SAXReader reader = new SAXReader();
+ Document document = reader.read(source);
+
+ RewriteResults results = desciptorModifier.modifyDescriptor(dep, document);
+ results.webXML = destFile.toURL();
+
+ FileOutputStream fos = new FileOutputStream(destFile);
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ XMLWriter writer = new XMLWriter(fos, format);
+ writer.write(document);
+ writer.close();
+
+ return results;
+ }
+}
\ No newline at end of file
Modified: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/IOUtils.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/IOUtils.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/IOUtils.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -37,7 +37,6 @@
import javax.activation.DataHandler;
import javax.xml.ws.WebServiceException;
-import org.jboss.logging.Logger;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -48,8 +47,6 @@
*/
public final class IOUtils
{
- private static Logger log = Logger.getLogger(IOUtils.class);
-
// Hide the constructor
private IOUtils()
{
@@ -86,12 +83,12 @@
r = reader.read(bytes);
}
}
-
+
public static byte[] convertToBytes(DataHandler dh)
{
try
{
- ByteArrayOutputStream buffOS= new ByteArrayOutputStream();
+ ByteArrayOutputStream buffOS = new ByteArrayOutputStream();
dh.writeTo(buffOS);
return buffOS.toByteArray();
}
@@ -123,12 +120,12 @@
public static File createTempDirectory() throws IOException
{
File tmpdir = null;
-
+
try
{
ServerConfigFactory factory = ServerConfigFactory.getInstance();
ServerConfig config = factory.getServerConfig();
-
+
tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/jbossws");
tmpdir.mkdirs();
}
@@ -136,7 +133,7 @@
{
// Use the Java temp directory if there is no server config (the client)
}
-
+
return tmpdir;
}
}
Modified: trunk/integration/sunri/ant-import/build-thirdparty.xml
===================================================================
--- trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/ant-import/build-thirdparty.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -71,6 +71,7 @@
<!-- The compile classpath for jboss50 integration -->
<path id="sunri50.integration.classpath">
<pathelement location="${spi.dir}/output/lib/jbossws-spi.jar"/>
+ <pathelement location="${jboss50.lib}/dom4j.jar"/>
<pathelement location="${jboss50.lib}/jboss-aop-jdk50.jar"/>
<pathelement location="${jboss50.lib}/jboss-common-core.jar"/>
<pathelement location="${jboss50.lib}/jboss-dependency.jar"/>
Modified: trunk/integration/sunri/build.xml
===================================================================
--- trunk/integration/sunri/build.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/build.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -129,6 +129,9 @@
<include name="jbossws-context.war"/>
</fileset>
-->
+ <fileset dir="${spi.dir}/thirdparty">
+ <include name="jaxrpc-api.jar"/>
+ </fileset>
<fileset dir="${thirdparty.dir}">
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/InvokerEJB3.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -27,7 +27,12 @@
import java.lang.reflect.Method;
import javax.xml.ws.Provider;
+import javax.xml.ws.WebServiceException;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointInvocation;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
import com.sun.istack.NotNull;
import com.sun.xml.ws.api.message.Packet;
import com.sun.xml.ws.api.server.InstanceResolver;
@@ -44,7 +49,7 @@
public class InvokerEJB3 extends Invoker
{
private final InstanceResolver resolver;
-
+
public InvokerEJB3(InstanceResolver resolver)
{
this.resolver = resolver;
@@ -72,7 +77,35 @@
@Override
public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException
{
- Object targetBean = resolver.resolve(p);
- return m.invoke(targetBean, args);
+ Endpoint ep = EndpointAssociation.getEndpoint();
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ EndpointInvocation inv = invHandler.createInvocation();
+ inv.setJavaMethod(m);
+ inv.setArgs(args);
+
+ Object retObj = null;
+ try
+ {
+ invHandler.invoke(ep, null, inv);
+ retObj = inv.getReturnValue();
+ }
+ catch (Exception ex)
+ {
+ handleException(ex);
+ }
+
+ return retObj;
}
-}
+
+ private void handleException(Exception ex) throws InvocationTargetException, IllegalAccessException
+ {
+ if (ex instanceof InvocationTargetException)
+ throw (InvocationTargetException)ex;
+
+ if (ex instanceof IllegalAccessException)
+ throw (IllegalAccessException)ex;
+
+ throw new WebServiceException(ex);
+ }
+}
\ No newline at end of file
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/RequestHandlerImpl.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -56,6 +56,9 @@
public void handleHttpRequest(Endpoint endpoint, HttpServletRequest req, HttpServletResponse res, ServletContext context) throws ServletException, IOException
{
WSServletDelegate delegate = (WSServletDelegate)context.getAttribute(WSServlet.JAXWS_RI_RUNTIME_INFO);
+ if (delegate == null)
+ throw new IllegalStateException("Cannot obtain servlet delegate");
+
String method = req.getMethod();
if (method.equals("POST"))
{
Modified: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeployer.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -23,12 +23,6 @@
//$Id$
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.web.Servlet;
-import org.jboss.metadata.web.ServletMapping;
import org.jboss.wsf.spi.deployment.AbstractDeployer;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -49,68 +43,14 @@
DDEndpoints dd = new DDEndpoints();
for (Endpoint ep : dep.getService().getEndpoints())
{
- String name = getName(dep, ep);
- String implBean = ep.getTargetBean();
- String urlPattern = getUrlPattern(dep, ep);
+ String epName = ep.getShortName();
+ String targetBean = ep.getTargetBean();
+ String urlPattern = ep.getURLPattern();
- DDEndpoint ddep = new DDEndpoint(name, implBean, urlPattern);
+ DDEndpoint ddep = new DDEndpoint(epName, targetBean, urlPattern);
log.info("Add " + ddep);
dd.addEndpoint(ddep);
}
dep.getContext().addAttachment(DDEndpoints.class, dd);
}
-
- private String getName(Deployment dep, Endpoint ep)
- {
- String name = null;
- String implBean = ep.getTargetBean();
- WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- for (Servlet servlet : webMetaData.getServlets())
- {
- String servletClass = servlet.getServletClass();
- if (implBean.equals(servletClass))
- {
- name = servlet.getName();
- }
- }
- }
- return name;
- }
-
- private String getUrlPattern(Deployment dep, Endpoint ep)
- {
- String urlPattern = null;
- String targetBean = ep.getTargetBean();
- WebMetaData webMetaData = dep.getContext().getAttachment(WebMetaData.class);
- if (webMetaData != null)
- {
- for (Servlet servlet : webMetaData.getServlets())
- {
- String name = servlet.getName();
- String servletClass = servlet.getServletClass();
- if (targetBean.equals(servletClass))
- {
- ServletMapping mapping = getServletMapping(webMetaData, name);
- ArrayList<String> urlPatterns = mapping.getUrlPatterns();
- if (urlPatterns.size() > 0)
- urlPattern = urlPatterns.get(0);
- }
- }
- }
- return urlPattern;
- }
-
- private ServletMapping getServletMapping(WebMetaData webMetaData, String name)
- {
- Iterator it = webMetaData.getServletMappings().iterator();
- while (it.hasNext())
- {
- ServletMapping mapping = (ServletMapping)it.next();
- if (name.equals(mapping.getName()))
- return mapping;
- }
- throw new IllegalStateException("Cannot obtian mapping for: " + name);
- }
}
\ No newline at end of file
Added: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
===================================================================
--- trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java (rev 0)
+++ trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -0,0 +1,135 @@
+/*
+ * 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.wsf.stack.sunri;
+
+import java.util.Iterator;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
+
+ private String listenerClass;
+ private String servletClass;
+
+ public String getListenerClass()
+ {
+ return listenerClass;
+ }
+
+ public void setListenerClass(String listenerClass)
+ {
+ this.listenerClass = listenerClass;
+ }
+
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+
+ public void setServletClass(String servletClass)
+ {
+ this.servletClass = servletClass;
+ }
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+
+ Element root = webXml.getRootElement();
+
+ DDEndpoints ddSunJaxws = dep.getContext().getAttachment(DDEndpoints.class);
+ if (ddSunJaxws == null)
+ throw new IllegalStateException("Cannot obtain sun-jaxws meta data");
+
+ Element contextParam = root.addElement("context-param");
+ contextParam.addElement("param-name").addText(WSServletContextListenerJBWS.PARAM_SUN_JAXWS_URL);
+ contextParam.addElement("param-value").addText(ddSunJaxws.createFileURL().toExternalForm());
+
+ root.addElement("listener").addElement("listener-class").addText(listenerClass);
+
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+ targetBeanName = orgServletClassName;
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+}
\ No newline at end of file
Property changes on: trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/integration/sunri/src/main/resources/jbossws-jboss50.sar/META-INF/jbossws-beans.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -102,6 +102,7 @@
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
<inject bean="WSContextRootDeployer"/>
<inject bean="WSURLPatternDeployer"/>
+ <inject bean="WSSunJaxwsDeployer"/>
<inject bean="WSWebAppGeneratorDeployer"/>
<inject bean="WSWebAppDeployerDeployer"/>
</list>
@@ -137,26 +138,30 @@
<bean name="WSEndpointNameDeployer" class="org.jboss.wsf.spi.deployment.EndpointNameDeployer"/>
<bean name="WSEndpointRegistryDeployer" class="org.jboss.wsf.spi.deployment.EndpointRegistryDeployer"/>
<bean name="WSModifyWebMetaDataDeployer" class="org.jboss.wsf.stack.sunri.ModifyWebMetaDataDeployer">
- <property name="listenerClass">org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</property>
- <property name="servletClass">org.jboss.wsf.stack.sunri.WSEndpointServletJBWS</property>
+ <property name="listenerClass"><inject bean="WSWebAppDesciptorModifier" property="listenerClass"/></property>
+ <property name="servletClass"><inject bean="WSWebAppDesciptorModifier" property="servletClass"/></property>
</bean>
<bean name="WSSunJaxwsDeployer" class="org.jboss.wsf.stack.sunri.SunJaxwsDeployer"/>
+ <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
+ <bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
<property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
</bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss50.WebAppDeployerDeployer">
- <property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
+ <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
</bean>
- <bean name="WSUnifiedDeploymentInfoDeployer" class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeployer"/>
- <bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
<!-- Deployer helper beans -->
<bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB21"/>
<bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss50.SecurityRolesHandlerEJB3"/>
- <bean name="WSServiceEndpointPublisher" class="org.jboss.wsf.spi.deployment.ServiceEndpointPublisher">
- <property name="servletClass"><inject bean="WSModifyWebMetaDataDeployer" property="servletClass"/></property>
+ <bean name="WSWebAppDesciptorModifier" class="org.jboss.wsf.stack.sunri.WebAppDesciptorModifierImpl">
+ <property name="listenerClass">org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</property>
+ <property name="servletClass">org.jboss.wsf.stack.sunri.WSEndpointServletJBWS</property>
</bean>
+ <bean name="WSWebXMLRewriter" class="org.jboss.wsf.spi.deployment.WebXMLRewriter">
+ <property name="desciptorModifier"><inject bean="WSWebAppDesciptorModifier"/></property>
+ </bean>
<!--
Register DeployerHooks with JBoss deployers
Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/jbossws-core/.classpath 2007-05-20 00:29:48 UTC (rev 3150)
@@ -33,5 +33,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
<classpathentry combineaccessrules="false" kind="src" path="/integration-spi"/>
<classpathentry kind="lib" path="/integration-spi/thirdparty/junit.jar"/>
+ <classpathentry kind="lib" path="thirdparty/dom4j.jar"/>
<classpathentry kind="output" path="output-eclipse"/>
</classpath>
Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-05-19 16:25:26 UTC (rev 3149)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-05-20 00:29:48 UTC (rev 3150)
@@ -110,6 +110,7 @@
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-annotations-ejb3.jar"/>
<pathelement location="${thirdparty.dir}/ejb3.deployer/jboss-ejb3x.jar"/>
<pathelement location="${thirdparty.dir}/activation.jar"/>
+ <pathelement location="${thirdparty.dir}/dom4j.jar"/>
<pathelement location="${thirdparty.dir}/getopt.jar"/>
<pathelement location="${thirdparty.dir}/javassist.jar"/>
<pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
Added: trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/WebAppDesciptorModifierImpl.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/WebAppDesciptorModifierImpl.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/WebAppDesciptorModifierImpl.java 2007-05-20 00:29:48 UTC (rev 3150)
@@ -0,0 +1,152 @@
+/*
+ * 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.wsf.stack.jbws;
+
+import java.util.Iterator;
+
+import org.dom4j.Document;
+import org.dom4j.Element;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
+
+/**
+ * Modifies web.xml for jbossws
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 19-May-2006
+ */
+public class WebAppDesciptorModifierImpl implements WebAppDesciptorModifier
+{
+ // logging support
+ private static Logger log = Logger.getLogger(WebAppDesciptorModifierImpl.class);
+
+ // The configured service endpoint servlet
+ private String servletClass;
+
+ public String getServletClass()
+ {
+ return servletClass;
+ }
+
+ public void setServletClass(String servletClass)
+ {
+ this.servletClass = servletClass;
+ }
+
+ public RewriteResults modifyDescriptor(Deployment dep, Document webXml) throws ClassNotFoundException
+ {
+ RewriteResults results = new RewriteResults();
+
+ Element root = webXml.getRootElement();
+ for (Iterator it = root.elementIterator("servlet"); it.hasNext();)
+ {
+ Element servlet = (Element)it.next();
+ String linkName = servlet.element("servlet-name").getTextTrim();
+
+ // find the servlet-class
+ Element classElement = servlet.element("servlet-class");
+
+ // JSP
+ if (classElement == null)
+ continue;
+
+ String orgServletClassName = classElement.getTextTrim();
+
+ // Get the servlet class
+ Class orgServletClass = null;
+ try
+ {
+ ClassLoader loader = dep.getClassLoader();
+ orgServletClass = loader.loadClass(orgServletClassName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ log.warn("Cannot load servlet class: " + orgServletClassName);
+ }
+
+ String targetBeanName = null;
+
+ // Nothing to do if we have an <init-param>
+ if (isAlreadyModified(servlet))
+ {
+ for (Iterator itParam = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)itParam.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ String paramValue = elParam.element("param-value").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ {
+ targetBeanName = paramValue;
+ }
+ }
+ }
+ else
+ {
+ // Check if it is a real servlet that we can ignore
+ if (orgServletClass != null && javax.servlet.Servlet.class.isAssignableFrom(orgServletClass))
+ {
+ log.info("Ignore servlet: " + orgServletClassName);
+ continue;
+ }
+ else if (orgServletClassName.endsWith("Servlet"))
+ {
+ log.info("Ignore <servlet-class> that ends with 'Servlet': " + orgServletClassName);
+ continue;
+ }
+
+ classElement.setText(servletClass);
+
+ // add additional init params
+ if (orgServletClassName.equals(servletClass) == false)
+ {
+ targetBeanName = orgServletClassName;
+ Element paramElement = classElement.addElement("init-param");
+ paramElement.addElement("param-name").addText(Endpoint.SEPID_DOMAIN_ENDPOINT);
+ paramElement.addElement("param-value").addText(targetBeanName);
+ }
+ }
+
+ if (targetBeanName == null)
+ throw new IllegalStateException("Cannot obtain service endpoint bean for: " + linkName);
+
+ // remember the target bean name
+ results.sepTargetMap.put(linkName, targetBeanName);
+ }
+
+ return results;
+ }
+
+ // Return true if the web.xml is already modified
+ private boolean isAlreadyModified(Element servlet)
+ {
+ for (Iterator it = servlet.elementIterator("init-param"); it.hasNext();)
+ {
+ Element elParam = (Element)it.next();
+ String paramName = elParam.element("param-name").getTextTrim();
+ if (Endpoint.SEPID_DOMAIN_ENDPOINT.equals(paramName))
+ return true;
+ }
+ return false;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/wsf/stack/jbws/WebAppDesciptorModifierImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
18 years, 11 months
JBossWS SVN: r3149 - in trunk/integration: jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-19 12:25:26 -0400 (Sat, 19 May 2007)
New Revision: 3149
Removed:
trunk/integration/jboss42/src/main/java/org/jboss/wsintegration/
Modified:
trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
Log:
Fix WebAppGeneratorDeployer
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-19 15:48:49 UTC (rev 3148)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws42.sar/jbossws.beans/META-INF/jboss-beans.xml 2007-05-19 16:25:26 UTC (rev 3149)
@@ -151,12 +151,17 @@
<bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeployer"/>
<bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
- <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.stack.jbws.WebAppGeneratorDeployer"/>
+ <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
+ <property name="securityRolesHandlerEJB21"><inject bean="WSSecurityRolesHandlerEJB21"/></property>
+ <property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
+ </bean>
<bean name="WSWebAppDeployerDeployer" class="org.jboss.wsf.container.jboss42.WebAppDeployerDeployer">
<property name="serviceEndpointPublisher"><inject bean="WSServiceEndpointPublisher"/></property>
</bean>
<!-- Deployer helper beans -->
+ <bean name="WSSecurityRolesHandlerEJB21" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB21"/>
+ <bean name="WSSecurityRolesHandlerEJB3" class="org.jboss.wsf.container.jboss42.SecurityRolesHandlerEJB3"/>
<bean name="WSServiceEndpointPublisher" class="org.jboss.wsf.spi.deployment.ServiceEndpointPublisher">
<property name="servletClass">org.jboss.wsf.stack.jbws.ServiceEndpointServlet</property>
</bean>
Modified: trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml
===================================================================
--- trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-19 15:48:49 UTC (rev 3148)
+++ trunk/integration/jbws/src/main/resources/jbossws-jbws50.sar/META-INF/jbossws-beans.xml 2007-05-19 16:25:26 UTC (rev 3149)
@@ -161,7 +161,7 @@
<bean name="WSUnifiedMetaDataAssociationDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataAssociationDeployer"/>
<bean name="WSUnifiedMetaDataDeployer" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeployer"/>
<bean name="WSURLPatternDeployer" class="org.jboss.wsf.spi.deployment.URLPatternDeployer"/>
- <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.stack.jbws.WebAppGeneratorDeployer">
+ <bean name="WSWebAppGeneratorDeployer" class="org.jboss.wsf.spi.deployment.WebAppGeneratorDeployer">
<property name="securityRolesHandlerEJB21"><inject bean="WSSecurityRolesHandlerEJB21"/></property>
<property name="securityRolesHandlerEJB3"><inject bean="WSSecurityRolesHandlerEJB3"/></property>
</bean>
18 years, 11 months
JBossWS SVN: r3148 - trunk/jbossws-core/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-05-19 11:48:49 -0400 (Sat, 19 May 2007)
New Revision: 3148
Modified:
trunk/jbossws-core/ant-import/build-release.xml
Log:
Fix component-info.xml
Modified: trunk/jbossws-core/ant-import/build-release.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-release.xml 2007-05-19 15:35:46 UTC (rev 3147)
+++ trunk/jbossws-core/ant-import/build-release.xml 2007-05-19 15:48:49 UTC (rev 3148)
@@ -31,7 +31,7 @@
<include name="jbossws-resources.zip"/>
</fileset>
</copy>
- <copy tofile="${jboss.repository.dir}/jbossws/${repository.id}/component-info.xml" file="${core.etc.dir}/component-info.xml" filtering="true" overwrite="true">
+ <copy tofile="${jboss.repository.dir}/jbossws/${repository.id}/component-info.xml" file="${core.output.etc.dir}/component-info.xml" filtering="true" overwrite="true">
<filterset>
<filtersfile file="${build.dir}/version.properties"/>
</filterset>
18 years, 11 months