[jbossws-commits] JBossWS SVN: r12875 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Mon Aug 30 08:32:40 EDT 2010


Author: richard.opalka at jboss.com
Date: 2010-08-30 08:32:39 -0400 (Mon, 30 Aug 2010)
New Revision: 12875

Added:
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello1Impl.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello2Impl.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/HelloIface.java
   framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/JBWS3009TestCase.java
Modified:
   framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3009] providing test case

Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml	2010-08-30 09:26:44 UTC (rev 12874)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml	2010-08-30 12:32:39 UTC (rev 12875)
@@ -943,6 +943,15 @@
 			</webinf>
 		</war> 
 
+		<!-- jaxws-jbws3009 -->
+		<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws3009.jar">
+			<fileset dir="${tests.output.dir}/test-classes">
+				<include name="org/jboss/test/ws/jaxws/jbws3009/HelloIface.class"/>
+				<include name="org/jboss/test/ws/jaxws/jbws3009/Hello1Impl.class"/>
+				<include name="org/jboss/test/ws/jaxws/jbws3009/Hello2Impl.class"/>
+			</fileset>
+		</jar>
+
 		<!-- jaxws-jbws3022 -->
 		<war warfile="${tests.output.dir}/test-libs/jaxws-jbws3022.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3022/WEB-INF/web.xml">
 			<classes dir="${tests.output.dir}/test-classes">

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello1Impl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello1Impl.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello1Impl.java	2010-08-30 12:32:39 UTC (rev 12875)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3009;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+ at Stateless
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws3009.HelloIface", targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws3009", serviceName = "Service1")
+ at WebContext(contextRoot = "jbws3009-context1")
+public class Hello1Impl implements HelloIface
+{
+   public String sayHello()
+   {
+      return "Hello 1";
+   }
+}

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello2Impl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello2Impl.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/Hello2Impl.java	2010-08-30 12:32:39 UTC (rev 12875)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3009;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+ at Stateless
+ at WebService(endpointInterface = "org.jboss.test.ws.jaxws.jbws3009.HelloIface", targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws3009", serviceName = "Service2")
+ at WebContext(contextRoot = "jbws3009-context2")
+public class Hello2Impl implements HelloIface
+{
+   public String sayHello()
+   {
+      return "Hello 2";
+   }
+}

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/HelloIface.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/HelloIface.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/HelloIface.java	2010-08-30 12:32:39 UTC (rev 12875)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3009;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+ at WebService(targetNamespace = "http://www.jboss.org/test/ws/jaxws/jbws3009")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface HelloIface
+{
+   String sayHello();
+}

Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/JBWS3009TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/JBWS3009TestCase.java	                        (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws3009/JBWS3009TestCase.java	2010-08-30 12:32:39 UTC (rev 12875)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws3009;
+
+import java.net.URL;
+
+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.JBossWSTestSetup;
+
+/**
+ * [JBWS-3009] EJB3 services in different web contexts.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public class JBWS3009TestCase extends JBossWSTest
+{
+   public static Test suite()
+   {
+      return new JBossWSTestSetup(JBWS3009TestCase.class, "jaxws-jbws3009.jar");
+   }
+
+   public void testEJB1() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3009-context1/Hello1Impl?wsdl");
+      QName serviceName = new QName("http://www.jboss.org/test/ws/jaxws/jbws3009", "Service1");
+      Service.create(wsdlURL, serviceName);
+      Service service = Service.create(wsdlURL, serviceName);
+      HelloIface port = (HelloIface)service.getPort(HelloIface.class);
+      assertEquals("Hello 1", port.sayHello());
+   }
+
+   public void testEJB2() throws Exception
+   {
+      URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jbws3009-context2/Hello2Impl?wsdl");
+      QName serviceName = new QName("http://www.jboss.org/test/ws/jaxws/jbws3009", "Service2");
+      Service.create(wsdlURL, serviceName);
+      Service service = Service.create(wsdlURL, serviceName);
+      HelloIface port = (HelloIface)service.getPort(HelloIface.class);
+      assertEquals("Hello 2", port.sayHello());
+   }
+}



More information about the jbossws-commits mailing list