Author: richard.opalka(a)jboss.com
Date: 2011-10-13 08:16:03 -0400 (Thu, 13 Oct 2011)
New Revision: 15094
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/BothPojoAndEjbInWarTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EndpointIface.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/POJOEndpoint.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/jboss-web.xml
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/web.xml
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3376][AS7-1605] providing test case
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-10-13
09:06:44 UTC (rev 15093)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2011-10-13
12:16:03 UTC (rev 15094)
@@ -1116,6 +1116,28 @@
</classes>
</war>
+ <!-- jaxws-jbws3367 -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3367-usecase1.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3367/EndpointIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3367/POJOEndpoint.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF">
+ <include name="jboss-web.xml" />
+ </webinf>
+ </war>
+
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3367-usecase2.war"
needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3367/EndpointIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/jbws3367/WEB-INF">
+ <include name="jboss-web.xml" />
+ </webinf>
+ </war>
+
<!-- jaxws-endpoint-servlet -->
<war warfile="${tests.output.dir}/test-libs/jaxws-endpoint-servlet.war"
manifest="${tests.output.dir}/test-resources/jaxws/endpoint/META-INF/MANIFEST.MF"
webxml="${tests.output.dir}/test-resources/jaxws/endpoint/WEB-INF/web.xml">
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/BothPojoAndEjbInWarTestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/BothPojoAndEjbInWarTestCase.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/BothPojoAndEjbInWarTestCase.java 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., 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.jbws3367;
+
+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-3367][AS7-1605] jboss-web.xml ignored for web service root
+ *
+ * This test case tests if both POJO & EJB3 endpoints are in war archive.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class BothPojoAndEjbInWarTestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(BothPojoAndEjbInWarTestCase.class,
"jaxws-jbws3367-usecase1.war");
+ }
+
+ public void testPOJOEndpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3367",
"POJOEndpointService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jbws3367-customized/POJOEndpoint?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final EndpointIface port = service.getPort(EndpointIface.class);
+ final String result = port.echo("hello");
+ assertEquals("POJO hello", result);
+ }
+
+ public void testEJB3Endpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3367",
"EJB3EndpointService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jbws3367-customized/EJB3Endpoint?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final EndpointIface port = service.getPort(EndpointIface.class);
+ final String result = port.echo("hello");
+ assertEquals("EJB3 hello", result);
+ }
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EJB3Endpoint.java 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., 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.jbws3367;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+ * EJB3 endpoint.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@Stateless
+@WebService
+(
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws3367.EndpointIface",
+ targetNamespace = "org.jboss.test.ws.jaxws.jbws3367"
+)
+public class EJB3Endpoint
+{
+ public String echo(final String s)
+ {
+ return "EJB3 " + s;
+ }
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EndpointIface.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EndpointIface.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/EndpointIface.java 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., 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.jbws3367;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Endpoint interface.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+@SOAPBinding
+public interface EndpointIface
+{
+ String echo(String s);
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/OnlyEjbInWarTestCase.java 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., 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.jbws3367;
+
+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-3367][AS7-1605] jboss-web.xml ignored for web service root
+ *
+ * This test case tests if only EJB3 endpoints are in war archive.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class OnlyEjbInWarTestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(OnlyEjbInWarTestCase.class,
"jaxws-jbws3367-usecase2.war");
+ }
+
+ public void testEJB3Endpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3367",
"EJB3EndpointService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jbws3367-customized/EJB3Endpoint?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final EndpointIface port = service.getPort(EndpointIface.class);
+ final String result = port.echo("hello");
+ assertEquals("EJB3 hello", result);
+ }
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/POJOEndpoint.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/POJOEndpoint.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3367/POJOEndpoint.java 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., 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.jbws3367;
+
+import javax.jws.WebService;
+
+/**
+ * POJO endpoint.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+(
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws3367.EndpointIface",
+ targetNamespace = "org.jboss.test.ws.jaxws.jbws3367"
+)
+public class POJOEndpoint
+{
+ public String echo(final String s)
+ {
+ return "POJO " + s;
+ }
+}
Added:
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/jboss-web.xml
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/jboss-web.xml
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/jboss-web.xml 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+
+ <context-root>/jbws3367-customized</context-root>
+
+</jboss-web>
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/web.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/web.xml
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3367/WEB-INF/web.xml 2011-10-13
12:16:03 UTC (rev 15094)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="3.0"
+
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+ metadata-complete="false">
+
+ <servlet>
+ <servlet-name>POJOEndpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3367.POJOEndpoint</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>POJOEndpoint</servlet-name>
+ <url-pattern>/POJOEndpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>