Author: richard.opalka(a)jboss.com
Date: 2011-11-09 07:53:39 -0500 (Wed, 09 Nov 2011)
New Revision: 15223
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java
stack/native/trunk/modules/testsuite/pom.xml
Log:
enabling tests
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2011-11-09
12:51:00 UTC (rev 15222)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2011-11-09
12:53:39 UTC (rev 15223)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109ejb;
-import javax.naming.InitialContext;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
import junit.framework.Test;
@@ -37,6 +40,8 @@
*/
public class DocEJBTestCase extends JBossWSTest
{
+ private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109ejb";
+ private static final String TARGET_ENDPOINT_URL = "http://" +
getServerHost() + ":8080/jaxrpc-samples-jsr109ejb-doc";
private static JaxRpcTestService endpoint;
public static Test suite()
@@ -50,12 +55,16 @@
if (endpoint == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
- endpoint = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ endpoint = getService(JaxRpcTestService.class, "TestService",
"JaxRpcTestServicePort");
}
}
+ protected <T> T getService(final Class<T> clazz, final String serviceName,
final String portName) throws Exception {
+ ServiceFactory serviceFactory = ServiceFactory.newInstance();
+ Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL +
"?wsdl"), new QName(TARGET_NAMESPACE, serviceName));
+ return (T) service.getPort(new QName(TARGET_NAMESPACE, portName), clazz);
+ }
+
public void testEchoString() throws Exception
{
String hello = "Hello";
@@ -72,4 +81,5 @@
Object retObj = endpoint.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
}
+
}
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2011-11-09
12:51:00 UTC (rev 15222)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2011-11-09
12:53:39 UTC (rev 15223)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109ejb;
-import javax.naming.InitialContext;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
import junit.framework.Test;
@@ -37,6 +40,8 @@
*/
public class RpcEJBTestCase extends JBossWSTest
{
+ private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109ejb";
+ private static final String TARGET_ENDPOINT_URL = "http://" +
getServerHost() + ":8080/jaxrpc-samples-jsr109ejb-rpc";
private static JaxRpcTestService port;
public static Test suite()
@@ -50,12 +55,16 @@
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
- port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ port = getService(JaxRpcTestService.class, "TestService",
"JaxRpcTestServicePort");
}
}
+ protected <T> T getService(final Class<T> clazz, final String serviceName,
final String portName) throws Exception {
+ ServiceFactory serviceFactory = ServiceFactory.newInstance();
+ Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL +
"?wsdl"), new QName(TARGET_NAMESPACE, serviceName));
+ return (T) service.getPort(new QName(TARGET_NAMESPACE, portName), clazz);
+ }
+
public void testEchoString() throws Exception
{
String hello = "Hello";
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java 2011-11-09
12:51:00 UTC (rev 15222)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/DocJSETestCase.java 2011-11-09
12:53:39 UTC (rev 15223)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109pojo;
-import javax.naming.InitialContext;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
import junit.framework.Test;
@@ -37,6 +40,8 @@
*/
public class DocJSETestCase extends JBossWSTest
{
+ private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109pojo";
+ private static final String TARGET_ENDPOINT_URL = "http://" +
getServerHost() + ":8080/jaxrpc-samples-jsr109pojo-doc";
private static JaxRpcTestService port;
public static Test suite()
@@ -50,12 +55,16 @@
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestServiceJSE");
- port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ port = getService(JaxRpcTestService.class, "TestService",
"JaxRpcTestServicePort");
}
}
+ protected <T> T getService(final Class<T> clazz, final String serviceName,
final String portName) throws Exception {
+ ServiceFactory serviceFactory = ServiceFactory.newInstance();
+ Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL +
"?wsdl"), new QName(TARGET_NAMESPACE, serviceName));
+ return (T) service.getPort(new QName(TARGET_NAMESPACE, portName), clazz);
+ }
+
public void testEchoString() throws Exception
{
String hello = "Hello";
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java 2011-11-09
12:51:00 UTC (rev 15222)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxrpc/samples/jsr109pojo/RpcJSETestCase.java 2011-11-09
12:53:39 UTC (rev 15223)
@@ -21,17 +21,14 @@
*/
package org.jboss.test.ws.jaxrpc.samples.jsr109pojo;
-import java.io.File;
import java.net.URL;
-import javax.naming.InitialContext;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
-import javax.xml.rpc.Stub;
+import javax.xml.rpc.ServiceFactory;
import junit.framework.Test;
-import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -43,6 +40,8 @@
*/
public class RpcJSETestCase extends JBossWSTest
{
+ private static final String TARGET_NAMESPACE =
"http://org.jboss.ws/samples/jsr109pojo";
+ private static final String TARGET_ENDPOINT_URL = "http://" +
getServerHost() + ":8080/jaxrpc-samples-jsr109pojo-rpc";
private static JaxRpcTestService port;
public static Test suite()
@@ -56,12 +55,16 @@
if (port == null)
{
- InitialContext iniCtx = getInitialContext();
- Service service =
(Service)iniCtx.lookup("java:comp/env/service/TestServiceJSE");
- port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
+ port = getService(JaxRpcTestService.class, "TestService",
"JaxRpcTestServicePort");
}
}
+ protected <T> T getService(final Class<T> clazz, final String serviceName,
final String portName) throws Exception {
+ ServiceFactory serviceFactory = ServiceFactory.newInstance();
+ Service service = serviceFactory.createService(new URL(TARGET_ENDPOINT_URL +
"?wsdl"), new QName(TARGET_NAMESPACE, serviceName));
+ return (T) service.getPort(new QName(TARGET_NAMESPACE, portName), clazz);
+ }
+
public void testEchoString() throws Exception
{
String hello = "Hello";
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-11-09 12:51:00 UTC (rev 15222)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-11-09 12:53:39 UTC (rev 15223)
@@ -1029,8 +1029,6 @@
<exclude>org/jboss/test/ws/jaxws/jbws1988/UsernameAuthTestCase*</exclude>
<!-- TODO: EJB3 DD driven deployments -->
- <exclude>org/jboss/test/ws/jaxws/jbws1309/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1813/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws1841/**</exclude>
<exclude>org/jboss/test/ws/jaxws/jbws2241/**</exclude>
@@ -1149,8 +1147,6 @@
<exclude>org/jboss/test/ws/jaxws/wsaddressing/replyto/AddressingReplyToTestCase*</exclude>
<!-- # webservices-description in jboss-web.xml / jboss.xml -->
-
<exclude>org/jboss/test/ws/jaxrpc/samples/jsr109pojo/**</exclude>
-
<exclude>org/jboss/test/ws/jaxrpc/samples/jsr109ejb/**</exclude>
<exclude>org/jboss/test/ws/jaxrpc/wsse/SignEncryptFaultTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/wsse/RpcTestCase*</exclude>
<exclude>org/jboss/test/ws/jaxrpc/wsse/WebClientTestCase*</exclude>