Author: alessio.soldano(a)jboss.com
Date: 2011-02-26 22:11:55 -0500 (Sat, 26 Feb 2011)
New Revision: 13807
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java
Log:
[JBWS-3236] Some changes to endorsed testcase for running on AS7
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-02-27
03:10:49 UTC (rev 13806)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2011-02-27
03:11:55 UTC (rev 13807)
@@ -45,7 +45,9 @@
</jar>
<!-- jaxws-cxf-endorse -->
- <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-endorse.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/endorse/WEB-INF/web.xml">
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-endorse.war"
+
manifest="${tests.output.dir}/test-resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF"
+
webxml="${tests.output.dir}/test-resources/jaxws/cxf/endorse/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include
name="org/jboss/test/ws/jaxws/cxf/endorse/TestServlet.class"/>
<include
name="org/jboss/test/ws/jaxws/cxf/endorse/Helper.class"/>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java 2011-02-27
03:10:49 UTC (rev 13806)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/endorse/Helper.java 2011-02-27
03:11:55 UTC (rev 13807)
@@ -21,9 +21,14 @@
*/
package org.jboss.test.ws.jaxws.cxf.endorse;
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+import javax.xml.ws.soap.SOAPBinding;
+
import org.apache.cxf.BusFactory;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory;
-import org.jboss.wsf.test.JBossWSTestHelper;
/**
*
@@ -41,7 +46,20 @@
throw new RuntimeException("Expected " + JBossWSBusFactory.class +
" but got " + (factory == null ? null : factory.getClass()));
//check the Apache CXF JAXWS implementation is actually used
- if (!JBossWSTestHelper.isIntegrationCXF())
+ Object obj = getImplementationObject();
+ if (!obj.getClass().getName().contains("cxf"))
throw new RuntimeException("JAXWS implementation is not properly
endorsed!");
}
+
+ private static Object getImplementationObject()
+ {
+ Service service = Service.create(new QName("dummyService"));
+ Object obj = service.getHandlerResolver();
+ if (obj == null)
+ {
+ service.addPort(new QName("dummyPort"),
SOAPBinding.SOAP11HTTP_BINDING, "http://dummy-address");
+ obj = service.createDispatch(new QName("dummyPort"), Source.class,
Mode.PAYLOAD);
+ }
+ return obj;
+ }
}
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/endorse/META-INF/MANIFEST.MF 2011-02-27
03:11:55 UTC (rev 13807)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Dependencies: org.jboss.ws.jaxws-client services
\ No newline at end of file
Show replies by date