Author: richard.opalka(a)jboss.com
Date: 2011-10-25 09:38:13 -0400 (Tue, 25 Oct 2011)
New Revision: 15159
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOIface.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase1TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase2TestCase.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/WEB-INF/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/WEB-INF/web.xml
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3276] providing anonymous POJO test cases
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-25
09:57:17 UTC (rev 15158)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2011-10-25
13:38:13 UTC (rev 15159)
@@ -1106,6 +1106,22 @@
</webinf>
</war>
+ <!-- jaxws-jbws3276 -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3276-usecase1.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3276/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3276/POJOIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3276/POJOImpl.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.class"/>
+ </classes>
+ </war>
+
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-jbws3276-usecase2.war"
needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/jbws3276/POJOIface.class"/>
+ <include
name="org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.class"/>
+ </classes>
+ </war>
+
<!-- jaxws-jbws3293 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws3293.war"
webxml="${tests.output.dir}/test-resources/jaxws/jbws3293/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/AnonymousPOJO.java 2011-10-25
13:38:13 UTC (rev 15159)
@@ -0,0 +1,44 @@
+/*
+ * 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.jbws3276;
+
+import javax.jws.WebService;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+(
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws3276.POJOIface",
+ targetNamespace = "org.jboss.test.ws.jaxws.jbws3276",
+ serviceName = "AnonymousPOJOService"
+)
+public class AnonymousPOJO
+{
+
+ public String echo(final String s)
+ {
+ return s + " from anonymous POJO";
+ }
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOIface.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOIface.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOIface.java 2011-10-25
13:38:13 UTC (rev 15159)
@@ -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.jbws3276;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+@SOAPBinding
+public interface POJOIface
+{
+
+ String echo(String s);
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOImpl.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOImpl.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/POJOImpl.java 2011-10-25
13:38:13 UTC (rev 15159)
@@ -0,0 +1,44 @@
+/*
+ * 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.jbws3276;
+
+import javax.jws.WebService;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+(
+ endpointInterface = "org.jboss.test.ws.jaxws.jbws3276.POJOIface",
+ targetNamespace = "org.jboss.test.ws.jaxws.jbws3276",
+ serviceName = "POJOImplService"
+)
+public class POJOImpl
+{
+
+ public String echo(final String s)
+ {
+ return s + " from POJO";
+ }
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase1TestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase1TestCase.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase1TestCase.java 2011-10-25
13:38:13 UTC (rev 15159)
@@ -0,0 +1,68 @@
+/*
+ * 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.jbws3276;
+
+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-3276] Tests anonymous POJO in web archive that contains web.xml with other
endpoint.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class Usecase1TestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(Usecase1TestCase.class,
"jaxws-jbws3276-usecase1.war");
+ }
+
+ public void testAnonymousEndpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3276",
"AnonymousPOJOService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jaxws-jbws3276-usecase1/AnonymousPOJOService?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final POJOIface port = service.getPort(POJOIface.class);
+ final String result = port.echo("hello");
+ assertEquals("hello from anonymous POJO", result);
+ }
+
+ public void testDeclaredEndpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3276",
"POJOImplService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jaxws-jbws3276-usecase1/POJOService?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final POJOIface port = service.getPort(POJOIface.class);
+ final String result = port.echo("hello");
+ assertEquals("hello from POJO", result);
+ }
+
+}
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase2TestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase2TestCase.java
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3276/Usecase2TestCase.java 2011-10-25
13:38:13 UTC (rev 15159)
@@ -0,0 +1,58 @@
+/*
+ * 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.jbws3276;
+
+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-3276] Tests anonymous POJO in web archive that is missing web.xml.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class Usecase2TestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(Usecase2TestCase.class,
"jaxws-jbws3276-usecase2.war");
+ }
+
+ public void testAnonymousEndpoint() throws Exception
+ {
+ final QName serviceName = new QName("org.jboss.test.ws.jaxws.jbws3276",
"AnonymousPOJOService");
+ final URL wsdlURL = new
URL("http://localhost:8080/jaxws-jbws3276-usecase2/AnonymousPOJOService?wsdl");
+ final Service service = Service.create(wsdlURL, serviceName);
+ final POJOIface port = service.getPort(POJOIface.class);
+ final String result = port.echo("hello");
+ assertEquals("hello from anonymous POJO", result);
+ }
+
+}
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/WEB-INF/web.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/WEB-INF/web.xml
(rev 0)
+++
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3276/WEB-INF/web.xml 2011-10-25
13:38:13 UTC (rev 15159)
@@ -0,0 +1,15 @@
+<?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>POJOImpl</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws3276.POJOImpl</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>POJOImpl</servlet-name>
+ <url-pattern>/POJOService</url-pattern>
+ </servlet-mapping>
+</web-app>