[jboss-cvs] JBossAS SVN: r102308 - in trunk/testsuite: imports/sections and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 11 16:13:40 EST 2010


Author: alessio.soldano at jboss.com
Date: 2010-03-11 16:13:39 -0500 (Thu, 11 Mar 2010)
New Revision: 102308

Modified:
   trunk/testsuite/build.xml
   trunk/testsuite/imports/sections/ws.xml
   trunk/testsuite/src/main/org/jboss/test/ws/jaxws/ejb3Integration/WebServiceTestCase.java
   trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
Log:
Enable filtering on tests-ws resources copy to solve testsuite failures when the AS is not bound to localhost


Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2010-03-11 21:00:45 UTC (rev 102307)
+++ trunk/testsuite/build.xml	2010-03-11 21:13:39 UTC (rev 102308)
@@ -764,6 +764,7 @@
       <copy todir="${build.resources}" filtering="no">
          <fileset dir="${source.resources}">
             <exclude name="webservice/**"/>
+            <exclude name="ws/**"/>
             <include name="**/*"/>
          </fileset>
       </copy>

Modified: trunk/testsuite/imports/sections/ws.xml
===================================================================
--- trunk/testsuite/imports/sections/ws.xml	2010-03-11 21:00:45 UTC (rev 102307)
+++ trunk/testsuite/imports/sections/ws.xml	2010-03-11 21:13:39 UTC (rev 102308)
@@ -32,6 +32,27 @@
   <!-- ================================================================== -->
   
   <target name="_jars-ws" description="Build the org.jboss.test.ws deployments">
+
+    <mkdir dir="${build.lib}"/>
+    
+    <echo message="Using target node: ${node0}"/>
+    
+    <copy todir="${build.resources}/ws" filtering="yes">
+      <fileset dir="${source.resources}/ws">
+        <include name="**/*.wsdl"/>
+        <include name="**/*.xml"/>
+      </fileset>
+      <filterset>
+        <filter token="jbosstest.host.name" value="${node0}"/>
+      </filterset>
+    </copy>
+    <!-- Copy binary files -->
+    <copy todir="${build.resources}/ws">
+      <fileset dir="${source.resources}/ws">
+        <exclude name="**/*.wsdl"/>
+        <exclude name="**/*.xml"/>
+      </fileset>
+    </copy>
    
     <!-- jaxws-webserviceref -->
     <war warfile="${build.lib}/jaxws-webserviceref.war" webxml="${build.resources}/ws/jaxws/webserviceref/WEB-INF/web.xml">

Modified: trunk/testsuite/src/main/org/jboss/test/ws/jaxws/ejb3Integration/WebServiceTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/ws/jaxws/ejb3Integration/WebServiceTestCase.java	2010-03-11 21:00:45 UTC (rev 102307)
+++ trunk/testsuite/src/main/org/jboss/test/ws/jaxws/ejb3Integration/WebServiceTestCase.java	2010-03-11 21:13:39 UTC (rev 102308)
@@ -93,11 +93,14 @@
    public void testWebServiceRef() throws Exception
    {
       InitialContext iniCtx = getInitialContext();
-      BusinessInterface ejb3Remote = (BusinessInterface)iniCtx.lookup("/test-webservices/WebServiceRefBean");
+      if ("localhost".equals(getServerHost())) //requires AS bound to localhost, as this uses @WebServiceRef(wsdlLocation = "http://localhost..")
+      {
+         BusinessInterface ejb3Remote = (BusinessInterface)iniCtx.lookup("/test-webservices/WebServiceRefBean");
 
-      String msg = "testWebServiceRef";
-      Object retObj = ejb3Remote.echo(msg);
-      assertEquals(msg, retObj);
+         String msg = "testWebServiceRef";
+         Object retObj = ejb3Remote.echo(msg);
+         assertEquals(msg, retObj);
+      }
    }
 
    /**

Modified: trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl
===================================================================
--- trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	2010-03-11 21:00:45 UTC (rev 102307)
+++ trunk/testsuite/src/resources/ws/jaxws/webserviceref/META-INF/wsdl/TestEndpoint.wsdl	2010-03-11 21:13:39 UTC (rev 102308)
@@ -44,10 +44,10 @@
  </binding>
  <service name='TestEndpointService'>
   <port binding='tns:TestEndpointBinding' name='TestEndpointPort'>
+   <soap:address location='http://@jbosstest.host.name@:8080/jaxws-webserviceref/TestEndpoint'/>
    <!-- 
-   <soap:address location='http://@jbosstest.host.name@:8080/jaxws-webserviceref/TestEndpoint'/>
+   <soap:address location='http://localhost:8080/jaxws-webserviceref/TestEndpoint'/>
    -->
-   <soap:address location='http://localhost:8080/jaxws-webserviceref/TestEndpoint'/>
   </port>
  </service>
 </definitions>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list