Author: richard.opalka(a)jboss.com
Date: 2011-11-14 07:19:16 -0500 (Mon, 14 Nov 2011)
New Revision: 15255
Added:
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1841/META-INF/jboss-ejb3.xml
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java
Log:
Fixing test to be executable agaisnt AS7 too
- provided service-ref overrides specific to AS7
- distinguishing remote EJB JNDI depending on AS version in use
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2011-11-14
09:30:15 UTC (rev 15254)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2011-11-14
12:19:16 UTC (rev 15255)
@@ -483,6 +483,7 @@
<include name="wsdl/*" />
<include name="ejb-jar.xml" />
<include name="jboss.xml" />
+ <include name="jboss-ejb3.xml" />
<include name="jboss-webservices.xml" />
</metainf>
</jar>
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java 2011-11-14
09:30:15 UTC (rev 15254)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws1841/JBWS1841TestCase.java 2011-11-14
12:19:16 UTC (rev 15255)
@@ -58,7 +58,7 @@
port = Service.create(wsdlURL, serviceName).getPort(EndpointInterface.class);
InitialContext ctx = new InitialContext();
- remote = (StatelessRemote)ctx.lookup("/StatelessBean/remote");
+ remote = (StatelessRemote)ctx.lookup(getRemoteEjbJndiName());
}
}
@@ -91,4 +91,17 @@
String result = remote.echo4("Relay4");
assertEquals("Relay4", result);
}
+
+ private static String getRemoteEjbJndiName()
+ {
+ if (isTargetJBoss6())
+ {
+ return "/" + StatelessBean.class.getSimpleName() +
"/remote";
+ }
+ else
+ {
+ return "ejb:/jaxws-jbws1841//" + StatelessBean.class.getSimpleName()
+ "!" + StatelessRemote.class.getName();
+ }
+ }
+
}
Added:
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1841/META-INF/jboss-ejb3.xml
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1841/META-INF/jboss-ejb3.xml
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws1841/META-INF/jboss-ejb3.xml 2011-11-14
12:19:16 UTC (rev 15255)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<jboss:jboss
+
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
+
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss_5_0.xsd
+
http://java.sun.com/xml/ns/javaee
http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd"
+ version="3.1"
+ impl-version="2.0">
+
+ <enterprise-beans>
+ <session>
+ <ejb-name>StatelessBean</ejb-name>
+ <service-ref>
+ <service-ref-name>service/Endpoint3</service-ref-name>
+ <wsdl-override>META-INF/wsdl/TestService.wsdl</wsdl-override>
+ </service-ref>
+ <service-ref>
+ <service-ref-name>service/Endpoint4</service-ref-name>
+ <!-- Metro compatibility: we declare the service-qname since we're using
javax.xml.ws.Service in the ejb-jar.xml -->
+
<
service-qname>{http://www.openuri.org/2004/04/HelloWorld}EndpointServi...
+ <wsdl-override>META-INF/wsdl/TestService.wsdl</wsdl-override>
+ </service-ref>
+ </session>
+ </enterprise-beans>
+
+</jboss:jboss>