[jbossws-commits] JBossWS SVN: r3904 - in branches/tdiesler/trunk: integration/native and 14 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Jul 17 06:36:04 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-07-17 06:36:02 -0400 (Tue, 17 Jul 2007)
New Revision: 3904

Added:
   branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
Removed:
   branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire50/
   branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire42.sar/
   branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire50.deployer/
   branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire50.sar/
Modified:
   branches/tdiesler/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
   branches/tdiesler/trunk/integration/native/build.xml
   branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
   branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml
   branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
   branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
   branches/tdiesler/trunk/integration/sunri/build.xml
   branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
   branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
   branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
   branches/tdiesler/trunk/integration/sunri/src/test/resources/test-excludes.txt
   branches/tdiesler/trunk/integration/xfire/build.xml
   branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java
   branches/tdiesler/trunk/integration/xfire/src/test/resources/test-excludes.txt
   branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
   branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
   branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
Log:
partial

Modified: branches/tdiesler/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- branches/tdiesler/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -120,7 +120,7 @@
   </bean>
   
   <bean name="WSModifyWebMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss42.ModifyWebMetaDataDeploymentAspect">
-    <property name="requires">ContextProperties, ContainerMetaData</property>
+    <property name="requires">ContextProperties, ContainerMetaData, StackDescriptor</property>
     <property name="webXMLRewriter"><inject bean="WSWebXMLRewriter"/></property>
   </bean>
   

Modified: branches/tdiesler/trunk/integration/native/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/build.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/native/build.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -209,7 +209,9 @@
       <fileset dir="${native.output.lib.dir}/jbossws-native42">
         <include name="jbossws.beans/**"/>
       </fileset>
-      <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF"/>
+      <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
+        <include name="jboss-service.xml"/>
+      </metainf>
       <metainf dir="${core.dir}/src/main/resources/standard-config">
         <include name="standard-*-config.xml"/>
       </metainf>

Modified: branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/native/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointServlet.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -68,15 +68,11 @@
       Deployment dep = endpoint.getService().getDeployment();
       if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() == DeploymentType.JAXWS_JSE)
       {
-         // For JSE endpoints, this should be the tomcat classloader
-         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-         dep.setRuntimeClassLoader(classLoader);
-
          // Initialize the meta data model
          UnifiedMetaData umd = dep.getContext().getAttachment(UnifiedMetaData.class);
          if (umd.isEagerInitialized() == false)
          {
-            umd.setClassLoader(classLoader);
+            umd.setClassLoader(dep.getRuntimeClassLoader());
             umd.eagerInitialize();
          }
 

Modified: branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/native/src/main/resources/jbossws-native-config.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -88,7 +88,7 @@
   
   <bean name="WSNativeUnifiedMetaDataDeploymentAspect" class="org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect">
     <property name="requires">ContainerMetaData, URLPattern</property>
-    <property name="provides">UnifiedMetaDataModel, StackGeneratedDescriptor</property>
+    <property name="provides">UnifiedMetaDataModel, StackDescriptor</property>
   </bean>
   
   <!-- Deployment aspect installers -->  

Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/deployment/BasicDeploymentAspectManager.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -104,7 +104,16 @@
          }
 
          if (allAspects.size() != 0)
-            throw new IllegalStateException("Cannot add: " + allAspects);
+         {
+            Set<String> providedConditions = new HashSet<String>();
+            for (int i = 0; i < sortedAspects.size(); i++)
+            {
+               DeploymentAspect sortedAspect = sortedAspects.get(i);
+               providedConditions.addAll(sortedAspect.getProvidesAsSet());
+            }
+            
+            throw new IllegalStateException("Cannot add: " + allAspects + "\n provided: " + providedConditions);
+         }
          
          for (DeploymentAspect aspect : sortedAspects)
             log.info(name + ": " + aspect);

Modified: branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java
===================================================================
--- branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/EndpointServlet.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -33,8 +33,10 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.ws.WebServiceException;
 
+import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
 import org.jboss.wsf.spi.deployment.EndpointAssociation;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
 import org.jboss.wsf.spi.management.EndpointRegistry;
 import org.jboss.wsf.spi.management.EndpointRegistryFactory;
 import org.jboss.wsf.spi.utils.ObjectNameFactory;
@@ -102,5 +104,13 @@
                + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName);
          throw new WebServiceException("Cannot obtain endpoint for: " + oname);
       }
+      
+      // Set the runtime classloader for JSE endpoints, this should be the tomcat classloader
+      Deployment dep = endpoint.getService().getDeployment();
+      if (dep.getType() == DeploymentType.JAXRPC_JSE || dep.getType() == DeploymentType.JAXWS_JSE)
+      {
+         ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+         dep.setRuntimeClassLoader(classLoader);
+      }
    }
 }

Modified: branches/tdiesler/trunk/integration/sunri/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/sunri/build.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/sunri/build.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -59,7 +59,7 @@
   <target name="compile" depends="init,compile-classes,compile-etc" description="Compile all source files."/>
   
   <!-- Compile java sources -->
-  <target name="compile-classes" depends="compile-classes-sunri,compile-classes-sunri50"/>
+  <target name="compile-classes" depends="compile-classes-sunri"/>
   <target name="compile-classes-sunri" depends="init">
     <mkdir dir="${sunri.output.classes.dir}"/>
     <javac srcdir="${sunri.java.dir}" sourcepath="" destdir="${sunri.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
@@ -68,15 +68,6 @@
       <classpath refid="sunri.integration.classpath"/>
     </javac>
   </target>
-  <target name="compile-classes-sunri50" depends="init" if="jboss50.home">
-    <ant antfile="${int.jboss50.dir}/build.xml" target="jars" inheritall="false"/>
-    <mkdir dir="${sunri.output.classes.dir}"/>
-    <javac srcdir="${sunri.java.dir}" sourcepath="" destdir="${sunri.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/sunri50/**"/>
-      <classpath refid="sunri50.integration.classpath"/>
-    </javac>
-  </target>
   
   <!-- Compile etc files (manifests and such) -->
   <target name="compile-etc" depends="init">
@@ -196,13 +187,24 @@
         <include name="jbossws-beans.xml"/>
       </metainf>
     </jar>
-    
-   </target>
+  </target>
   
   <target name="jars-jboss42" depends="jars-common" if="jboss42.home">
     
     <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
     
+    <!-- Concat jboss-beans.xml -->
+    <concat destfile="${sunri.output.lib.dir}/jbossws-sunri42/jbossws.beans/META-INF/jboss-beans.xml">
+      <header trimleading="yes">
+        &lt;deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"&gt;
+      </header>
+      <fileset file="${sunri.resources.dir}/jbossws-sunri-config.xml"/>
+      <fileset file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+      <footer trimleading="yes">
+        &lt;/deployment&gt;
+      </footer>
+    </concat>
+    
     <!-- Build jbossws-sunri42.sar -->
     <jar jarfile="${sunri.output.lib.dir}/jbossws-sunri42.sar" manifest="${sunri.output.etc.dir}/default.mf">
       <fileset dir="${sunri.output.lib.dir}">
@@ -235,10 +237,10 @@
         <include name="stax-ex.jar"/>
         <include name="streambuffer.jar"/>
       </fileset>
-      <fileset dir="${sunri.resources.dir}/jbossws-sunri42.sar">
+      <fileset dir="${sunri.output.lib.dir}/jbossws-sunri42">
         <include name="jbossws.beans/**"/>
       </fileset>
-      <metainf dir="${sunri.resources.dir}/jbossws-sunri42.sar/META-INF">
+      <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
         <include name="jboss-service.xml"/>
       </metainf>
     </jar>

Modified: branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/SunJaxwsDeploymentAspect.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -32,6 +32,7 @@
 import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
 import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoint;
 import org.jboss.wsf.stack.sunri.metadata.sunjaxws.DDEndpoints;
 
@@ -75,7 +76,7 @@
          
          dep.getContext().addAttachment(DDEndpoints.class, dd);
          
-         String propKey = "SERVICE_ENDPOINT_CONTEXT_PARAMS";
+         String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
          Map<String, String> contextParams = (Map<String, String>)dep.getContext().getProperty(propKey);
          if (contextParams == null)
          {

Modified: branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java
===================================================================
--- branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/WSServletContextListenerExt.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -70,19 +70,6 @@
    {
    }
 
-   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))
@@ -120,6 +107,19 @@
       }
    }
 
+   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());
+      }
+   }
+
    /**
     * Externalized for integration 
     */

Modified: branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml
===================================================================
--- branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/sunri/src/main/resources/jbossws-sunri-config.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -67,8 +67,8 @@
     <property name="provides">ContextProperties</property>
     <property name="contextProperties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
-        <entry><key>SERVICE_ENDPOINT_LISTENER</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
-        <entry><key>SERVICE_ENDPOINT_SERVLET</key><value>org.jboss.wsf.spi.invocation.EndpointServlet</value></entry>
+        <entry><key>ServletClass</key><value>org.jboss.wsf.spi.invocation.EndpointServlet</value></entry>
+        <entry><key>ServletContextListener</key><value>org.jboss.wsf.stack.sunri.WSServletContextListenerJBWS</value></entry>
       </map>
     </property>
   </bean>
@@ -82,7 +82,7 @@
   
   <bean name="WSMetroDescriptorDeploymentAspect" class="org.jboss.wsf.stack.sunri.SunJaxwsDeploymentAspect">
     <property name="requires">URLPattern</property>
-    <property name="provides">StackGeneratedDescriptor</property>
+    <property name="provides">StackDescriptor</property>
   </bean>
   
   <!-- Deployment aspect installers -->  
@@ -91,17 +91,18 @@
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
         <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
+        <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
         <inject bean="WSMetroDescriptorDeploymentAspect"/>
       </set>
     </property>
   </bean>
-  <bean name="WSMetroMainDeploymentAspectInstaller" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
-    <property name="manager"><inject bean="WSMainDeploymentAspectManager"/></property>
+  <bean name="WSMetroDeploymentAspectInstallerEJB" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
     <property name="aspects">
       <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+        <inject bean="WSMetroContextPropertiesDeploymentAspect"/>
+        <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
         <inject bean="WSMetroDescriptorDeploymentAspect"/>
-        <inject bean="WSMetroEndpointHandlerDeploymentAspect"/>
       </set>
     </property>
   </bean>
-  

Modified: branches/tdiesler/trunk/integration/sunri/src/test/resources/test-excludes.txt
===================================================================
--- branches/tdiesler/trunk/integration/sunri/src/test/resources/test-excludes.txt	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/sunri/src/test/resources/test-excludes.txt	2007-07-17 10:36:02 UTC (rev 3904)
@@ -11,11 +11,5 @@
 #
 ###################################################################
 
-# [JBWS-1669] Fix WebServiceContext.getMessageContext()
-#org/jboss/test/ws/jaxws/samples/context/WebServiceContextEJBTestCase.java
-
 # [JBWS-1673] Fix JAXR samples for SunRI
 org/jboss/test/ws/jaxws/samples/jaxr/**
-
-# [JBWS-1674] Fix @WebServiceRef with SunRI
-#org/jboss/test/ws/jaxws/samples/retail/**

Modified: branches/tdiesler/trunk/integration/xfire/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/build.xml	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/xfire/build.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -59,7 +59,7 @@
   <target name="compile" depends="init,compile-classes,compile-etc" description="Compile all source files."/>
   
   <!-- Compile java sources -->
-  <target name="compile-classes" depends="compile-classes-xfire,compile-classes-xfire50"/>
+  <target name="compile-classes" depends="compile-classes-xfire"/>
   <target name="compile-classes-xfire" 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}"
@@ -68,15 +68,6 @@
       <classpath refid="xfire.integration.classpath"/>
     </javac>
   </target>
-  <target name="compile-classes-xfire50" depends="init" if="jboss50.home">
-    <ant antfile="${int.jboss50.dir}/build.xml" target="jars" inheritall="false"/>
-    <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/xfire50/**"/>
-      <classpath refid="xfire50.integration.classpath"/>
-    </javac>
-  </target>
   
   <!-- Compile etc files (manifests and such) -->
   <target name="compile-etc" depends="init">
@@ -115,7 +106,6 @@
     <mkdir dir="${xfire.output.lib.dir}"/>
     <jar jarfile="${xfire.output.lib.dir}/jbossws-xfire.jar" manifest="${xfire.output.etc.dir}/default.mf">
       <fileset dir="${xfire.output.classes.dir}">
-        <include name="org/jboss/wsf/stack/xfire50/**"/>
         <include name="org/jboss/wsf/stack/xfire/**"/>
       </fileset>
     </jar>
@@ -141,6 +131,17 @@
     
     <ant antfile="${int.jboss50.dir}/build.xml" target="jars" inheritall="false"/>
     
+    <!-- Concat jbossws-beans.xml -->
+    <concat destfile="${sunri.output.lib.dir}/jbossws-xfire50/jbossws-beans.xml">
+      <header trimleading="yes">
+        &lt;deployment xmlns="urn:jboss:bean-deployer:2.0"&gt;
+      </header>
+      <fileset file="${xfire.resources.dir}/jbossws-xfire-config.xml"/>
+      <footer trimleading="yes">
+        &lt;/deployment&gt;
+      </footer>
+    </concat>
+    
     <!-- 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
@@ -163,29 +164,32 @@
         <include name="xfire-all.jar"/>
         <include name="xfire-jsr181-api.jar"/>
       </fileset>
-      <metainf dir="${xfire.resources.dir}/jbossws-xfire50.sar/META-INF">
+      <fileset dir="${xfire.output.lib.dir}">
+        <include name="jbossws-xfire.jar"/>
+      </fileset>
+      <metainf dir="${xfire.output.lib.dir}/jbossws-xfire50">
         <include name="jbossws-beans.xml"/>
       </metainf>
     </jar>
     
-    <!-- Build jbossws-xfire50-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-xfire.jar"/>
-      </fileset>
-      <fileset dir="${xfire.resources.dir}/jbossws-xfire50.deployer">
-        <include name="META-INF/jbossws-deployer-beans.xml"/>
-      </fileset>
-    </zip>
    </target>
   
   <target name="jars-jboss42" depends="jars-common" if="jboss42.home">
     
     <ant antfile="${int.jboss42.dir}/build.xml" target="jars" inheritall="false"/>
     
+    <!-- Concat jboss-beans.xml -->
+    <concat destfile="${xfire.output.lib.dir}/jbossws-xfire42/jbossws.beans/META-INF/jboss-beans.xml">
+      <header trimleading="yes">
+        &lt;deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd" xmlns="urn:jboss:bean-deployer"&gt;
+      </header>
+      <fileset file="${xfire.resources.dir}/jbossws-xfire-config.xml"/>
+      <fileset file="${int.jboss42.dir}/src/main/resources/jbossws-jboss42-config.xml"/>
+      <footer trimleading="yes">
+        &lt;/deployment&gt;
+      </footer>
+    </concat>
+    
     <!-- Build jbossws-xfire42.sar -->
     <jar jarfile="${xfire.output.lib.dir}/jbossws-xfire42.sar" manifest="${xfire.output.etc.dir}/default.mf">
       <fileset dir="${xfire.output.lib.dir}">
@@ -216,10 +220,10 @@
         <include name="xfire-all.jar"/>
         <include name="xfire-jsr181-api.jar"/>
       </fileset>
-      <fileset dir="${xfire.resources.dir}/jbossws-xfire42.sar">
+      <fileset dir="${xfire.output.lib.dir}/jbossws-xfire42">
         <include name="jbossws.beans/**"/>
       </fileset>
-      <metainf dir="${xfire.resources.dir}/jbossws-xfire42.sar/META-INF">
+      <metainf dir="${int.jboss42.dir}/src/main/resources/jbossws-jboss42.sar/META-INF">
         <include name="jboss-service.xml"/>
       </metainf>
     </jar>

Modified: branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/xfire/src/main/java/org/jboss/wsf/stack/xfire/XFireServicesDeploymentAspect.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -23,10 +23,14 @@
 
 //$Id: XFireServicesDeployer.java 3802 2007-07-05 16:44:32Z thomas.diesler at jboss.com $
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
 import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WebAppDesciptorModifier;
 import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
 import org.jboss.wsf.stack.xfire.metadata.services.DDBean;
 import org.jboss.wsf.stack.xfire.metadata.services.DDBeans;
@@ -96,6 +100,15 @@
          dd.addService(ddser);
       }
       dep.getContext().addAttachment(DDBeans.class, dd);
+      
+      String propKey = WebAppDesciptorModifier.CONTEXT_PARAMETER_MAP;
+      Map<String, String> contextParams = (Map<String, String>)dep.getContext().getProperty(propKey);
+      if (contextParams == null)
+      {
+         contextParams = new HashMap<String, String>();
+         dep.getContext().setProperty(propKey, contextParams);
+      }
+      contextParams.put(XFireConfigurableServletExt.PARAM_XFIRE_SERVICES_URL, dd.createFileURL().toExternalForm());
    }
 
 

Added: branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml	                        (rev 0)
+++ branches/tdiesler/trunk/integration/xfire/src/main/resources/jbossws-xfire-config.xml	2007-07-17 10:36:02 UTC (rev 3904)
@@ -0,0 +1,76 @@
+  
+  <!-- An abstraction of server configuration aspects. -->  
+  <bean name="WSServerConfig" class="org.jboss.wsf.spi.management.BasicServerConfig">
+    <!--
+        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 -->
+  <!-- The registry for web service endpoints -->
+  <bean name="WSEndpointRegistry" class="org.jboss.wsf.stack.xfire.ManagedEndpointRegistry"/>
+  
+  <!-- 
+    The stack specific deployment aspects
+  --> 
+  <bean name="WSXFireContextPropertiesDeploymentAspect" class="org.jboss.wsf.spi.deployment.ContextPropertiesDeploymentAspect">
+    <property name="provides">ContextProperties</property>
+    <property name="contextProperties">
+      <map keyClass="java.lang.String" valueClass="java.lang.String">
+        <entry><key>ServletClass</key><value>org.jboss.wsf.stack.xfire.XFireConfigurableServletExt</value></entry>
+      </map>
+    </property>
+  </bean>
+
+  <bean name="WSXFireEndpointHandlerDeploymentAspect" class="org.jboss.wsf.spi.deployment.EndpointHandlerDeploymentAspect">
+    <property name="requires">ContainerEndpointHandler</property>
+    <property name="provides">StackEndpointHandler</property>
+    <property name="requestHandler">org.jboss.wsf.stack.xfire.RequestHandlerImpl</property>
+    <property name="lifecycleHandler">org.jboss.wsf.stack.xfire.LifecycleHandlerImpl</property>
+  </bean>
+
+  <bean name="WSXFireServicesDeploymentAspect" class="org.jboss.wsf.stack.xfire.XFireServicesDeploymentAspect">
+    <property name="provides">StackDescriptor</property>
+    <property name="serviceFactory">org.codehaus.xfire.jaxws.JAXWSServiceFactory</property>
+    <property name="invokerEJB3">org.jboss.wsf.stack.xfire.InvokerEJB3</property>
+    <property name="invokerJSE">org.jboss.wsf.stack.xfire.InvokerJSE</property>
+  </bean>
+
+  <!-- Deployment aspect installers -->  
+  <bean name="WSMetroDeploymentAspectInstallerJSE" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerJSE"/></property>
+    <property name="aspects">
+      <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+        <inject bean="WSXFireContextPropertiesDeploymentAspect"/>
+        <inject bean="WSXFireEndpointHandlerDeploymentAspect"/>
+        <inject bean="WSXFireServicesDeploymentAspect"/>
+      </set>
+    </property>
+  </bean>
+  <bean name="WSMetroDeploymentAspectInstallerEJB" class="org.jboss.wsf.spi.deployment.DeploymentAspectInstaller">
+    <property name="manager"><inject bean="WSDeploymentAspectManagerEJB"/></property>
+    <property name="aspects">
+      <set class="java.util.HashSet" elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+        <inject bean="WSXFireContextPropertiesDeploymentAspect"/>
+        <inject bean="WSXFireEndpointHandlerDeploymentAspect"/>
+        <inject bean="WSXFireServicesDeploymentAspect"/>
+      </set>
+    </property>
+  </bean>
+    

Modified: branches/tdiesler/trunk/integration/xfire/src/test/resources/test-excludes.txt
===================================================================
--- branches/tdiesler/trunk/integration/xfire/src/test/resources/test-excludes.txt	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/integration/xfire/src/test/resources/test-excludes.txt	2007-07-17 10:36:02 UTC (rev 3904)
@@ -36,6 +36,7 @@
 
 # [JBWS-1684] Fix @WebServiceRef with XFire
 org/jboss/test/ws/jaxws/samples/retail/**
+org/jboss/test/ws/jaxws/samples/serviceref/**
 org/jboss/test/ws/jaxws/samples/webserviceref/**
 
 # [JBWS-1689] Add support for SwaRef

Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefClientTestCase.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -21,18 +21,20 @@
  */
 package org.jboss.test.ws.jaxws.samples.serviceref;
 
-import junit.framework.Test;
-import org.jboss.wsf.spi.test.JBossWSTest;
-import org.jboss.wsf.spi.test.JBossWSTestSetup;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
 
 import javax.naming.InitialContext;
 import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
 
+import junit.framework.Test;
+
+import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
+import org.jboss.wsf.spi.test.JBossWSTestSetup;
+
 /**
  * Test the JAXWS <service-ref>
  *
@@ -45,7 +47,11 @@
 
    public static Test suite()
    {
-      return new JBossWSTestSetup(ServiceRefClientTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-client.jar");
+      String archives = "jaxws-serviceref.war";
+      if (new JBossWSTestHelper().isTargetJBoss50())
+         archives += ",jaxws-serviceref-client.jar";
+      
+      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
    }
 
    public void testWSDLAccess() throws Exception
@@ -58,6 +64,9 @@
 
    public void testDynamicProxy() throws Exception
    {
+      if (isTargetJBoss50() == false)
+         return;
+      
       URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
       QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
       Service service = Service.create(wsdlURL, qname);
@@ -70,15 +79,17 @@
 
    public void testApplicationClient() throws Exception
    {
+      if (isTargetJBoss50() == false)
+         return;
+      
       InitialContext iniCtx = getInitialContext("jbossws-client");
       Service service = (Service) iniCtx.lookup("java:comp/env/service2");
       TestEndpoint port = service.getPort(TestEndpoint.class);
       assertNotNull(port);
 
-      BindingProvider bp = (BindingProvider)port;
-
       System.out.println("FIXME [JBWS-1736]: MTOM property at service-ref level");
 
+      //BindingProvider bp = (BindingProvider)port;
       //boolean mtomEnabled = ((SOAPBinding)bp.getBinding()).isMTOMEnabled();
       //assertTrue("MTOM should be enabled on port", mtomEnabled);
 

Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -23,6 +23,7 @@
 
 import junit.framework.Test;
 import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 
 import javax.naming.InitialContext;
@@ -44,7 +45,11 @@
    
    public static Test suite()
    {
-      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-ejb-client.jar");
+      String archives = "jaxws-serviceref.war";
+      if (new JBossWSTestHelper().isTargetJBoss50())
+         archives += ",jaxws-serviceref-ejb-client.jar";
+      
+      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
    }
 
    public void testWSDLAccess() throws Exception
@@ -58,6 +63,9 @@
    
    public void testDynamicProxy() throws Exception
    {
+      if (isTargetJBoss50() == false)
+         return;
+      
       URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
       QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
       Service service = Service.create(wsdlURL, qname);
@@ -71,6 +79,9 @@
 
    public void testEJBClient() throws Exception
    {      
+      if (isTargetJBoss50() == false)
+         return;
+      
       InitialContext iniCtx = getInitialContext();
       EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
 

Modified: branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java
===================================================================
--- branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	2007-07-17 07:12:11 UTC (rev 3903)
+++ branches/tdiesler/trunk/testsuite/src/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefServletTestCase.java	2007-07-17 10:36:02 UTC (rev 3904)
@@ -23,6 +23,7 @@
 
 import junit.framework.Test;
 import org.jboss.wsf.spi.test.JBossWSTest;
+import org.jboss.wsf.spi.test.JBossWSTestHelper;
 import org.jboss.wsf.spi.test.JBossWSTestSetup;
 
 import javax.xml.namespace.QName;
@@ -45,7 +46,11 @@
    
    public static Test suite()
    {
-      return new JBossWSTestSetup(ServiceRefServletTestCase.class, "jaxws-serviceref.war, jaxws-serviceref-servlet-client.war");
+      String archives = "jaxws-serviceref.war";
+      if (new JBossWSTestHelper().isTargetJBoss50())
+         archives += ",jaxws-serviceref-servlet-client.war";
+      
+      return new JBossWSTestSetup(ServiceRefEJBTestCase.class, archives);
    }
 
    public void testWSDLAccess() throws Exception
@@ -58,6 +63,9 @@
   
    public void testDynamicProxy() throws Exception
    {
+      if (isTargetJBoss50() == false)
+         return;
+      
       URL wsdlURL = new File("resources/jaxws/samples/serviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
       QName qname = new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "TestEndpointService");
       Service service = Service.create(wsdlURL, qname);
@@ -70,6 +78,9 @@
 
    public void testServletClient() throws Exception
    {
+      if (isTargetJBoss50() == false)
+         return;
+      
       URL url = new URL(TARGET_ENDPOINT_ADDRESS + "-servlet-client?echo=HelloWorld");
       BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
       String retStr = br.readLine();




More information about the jbossws-commits mailing list