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(a)"
+ 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&l...
+ <li><a
href="http://labs.jboss.com/jbossws/user-guide/en/html/index.html&qu...
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&...
forum</a></li>
+ <li><a
href="http://www.jboss.org/index.html?module=bb&op=viewforum&...
forum</a></li>
+ <li><a
href="https://lists.jboss.org/mailman/listinfo/jbossws-users"&g...
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=JBWSFAQSourceReposito...
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
+