Author: richard.opalka(a)jboss.com
Date: 2008-07-30 09:38:42 -0400 (Wed, 30 Jul 2008)
New Revision: 7950
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EJB3Bean.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EndpointInterface.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/JBWS2218TestCase.java
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2218] providing test case
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2008-07-30 12:28:08 UTC
(rev 7949)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2008-07-30 13:38:42 UTC
(rev 7950)
@@ -517,6 +517,14 @@
</webinf>
</war>
+ <!-- jaxws-jbws2218 -->
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2218.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2218/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws2218/*TestCase.class"/>
+ </fileset>
+ </jar>
+
<!-- jaxws-jbws2250 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2250.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws2250/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EJB3Bean.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EJB3Bean.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EJB3Bean.java 2008-07-30
13:38:42 UTC (rev 7950)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws2218;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+@Stateless
+@WebService
+@WebContext(contextRoot = "/myweb",
urlPattern="/myweb-service/WebDelegateEndPoint")
+public class EJB3Bean
+{
+ public String helloSimple(String msg)
+ {
+ return msg;
+ }
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EndpointInterface.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EndpointInterface.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/EndpointInterface.java 2008-07-30
13:38:42 UTC (rev 7950)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws2218;
+
+import javax.jws.WebService;
+
+@WebService(name = "EJB3Bean")
+public interface EndpointInterface
+{
+ String helloSimple(String msg);
+}
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/JBWS2218TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/JBWS2218TestCase.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2218/JBWS2218TestCase.java 2008-07-30
13:38:42 UTC (rev 7950)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.jbws2218;
+
+import java.net.MalformedURLException;
+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-2218] @WebContext url pattern problem
+ *
+ * @author richard.opalka(a)jboss.com
+ */
+public class JBWS2218TestCase extends JBossWSTest
+{
+ private static EndpointInterface port;
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2218TestCase.class,
"jaxws-jbws2218.jar");
+ }
+
+ public void setUp() throws MalformedURLException
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() +
":8080/myweb/myweb-service/WebDelegateEndPoint?wsdl");
+ QName serviceName = new
QName("http://jbws2218.jaxws.ws.test.jboss.org/", "EJB3BeanService");
+ Service service = Service.create(wsdlURL, serviceName);
+ port = service.getPort(EndpointInterface.class);
+ }
+ }
+
+ public void testSimpleAccess() throws Exception
+ {
+ String hello = port.helloSimple("hello");
+ assertEquals("hello", hello);
+ }
+}