[jbossws-commits] JBossWS SVN: r4947 - framework/branches/jbossws-framework-2.0.2/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Oct 31 05:20:43 EDT 2007


Author: thomas.diesler at jboss.com
Date: 2007-10-31 05:20:43 -0400 (Wed, 31 Oct 2007)
New Revision: 4947

Modified:
   framework/branches/jbossws-framework-2.0.2/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
Log:
javadoc

Modified: framework/branches/jbossws-framework-2.0.2/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java
===================================================================
--- framework/branches/jbossws-framework-2.0.2/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-10-31 01:35:11 UTC (rev 4946)
+++ framework/branches/jbossws-framework-2.0.2/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/ServiceRefEJBTestCase.java	2007-10-31 09:20:43 UTC (rev 4947)
@@ -21,18 +21,20 @@
  */
 package org.jboss.test.ws.jaxws.samples.serviceref;
 
+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.Service;
+
 import junit.framework.Test;
+
 import org.jboss.wsf.test.JBossWSTest;
 import org.jboss.wsf.test.JBossWSTestHelper;
 import org.jboss.wsf.test.JBossWSTestSetup;
 
-import javax.naming.InitialContext;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-import java.io.File;
-import java.io.InputStream;
-import java.net.URL;
-
 /**
  * Test the JAXRPC <service-ref>
  *
@@ -63,31 +65,32 @@
    
    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);
-      TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+      // JAXWS <service-ref> is only supported in EE5 
+      if (isTargetJBoss50())
+      {
+         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);
+         TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
 
-      String helloWorld = "testDynamicProxy";
-      Object retObj = port.echo(helloWorld);
-      assertEquals(helloWorld, retObj);
+         String helloWorld = "testDynamicProxy";
+         Object retObj = port.echo(helloWorld);
+         assertEquals(helloWorld, retObj);
+      }
    }
 
 
    public void testEJBClient() throws Exception
    {      
-      if (isTargetJBoss50() == false)
-         return;
-      
-      InitialContext iniCtx = getInitialContext();
-      EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
+      // JAXWS <service-ref> is only supported in EE5 
+      if (isTargetJBoss50())
+      {
+         InitialContext iniCtx = getInitialContext();
+         EJBRemote ejbRemote = (EJBRemote)iniCtx.lookup("/ejb/EJBClient");
 
-      String helloWorld = "Hello World!";
-      Object retObj = ejbRemote.echo(helloWorld);
-      assertEquals(helloWorld, retObj);
-      
+         String helloWorld = "Hello World!";
+         Object retObj = ejbRemote.echo(helloWorld);
+         assertEquals(helloWorld, retObj);
+      }
    }
 }




More information about the jbossws-commits mailing list