Author: alessio.soldano(a)jboss.com
Date: 2011-06-13 06:31:35 -0400 (Mon, 13 Jun 2011)
New Revision: 14533
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
Removed:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF-as7/wsdl/HelloWorldService.wsdl
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3125] Merging changes to trunk
Modified:
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml
===================================================================
---
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/resources/src/main/resources/modules/org/jboss/ws/common/main/module.xml 2011-06-13
10:31:35 UTC (rev 14533)
@@ -31,6 +31,7 @@
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
+ <module name="javax.xml.stream.api"/>
<module name="javax.ejb.api"/>
<module name="javax.jws.api"/>
<module name="javax.servlet.api"/>
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -39,6 +39,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainsMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -73,16 +74,19 @@
{
DDEndpoint ddep = createDDEndpoint(ep.getTargetBeanClass(),
(ArchiveDeployment)dep, ep);
- if (depType == DeploymentType.JAXWS_EJB3)
+ if (ep instanceof HttpEndpoint)
{
- ddep.setInvoker(invokerEJB3);
+ if (depType == DeploymentType.JAXWS_EJB3)
+ {
+ ddep.setInvoker(invokerEJB3);
+ }
+
+ if (depType == DeploymentType.JAXWS_JSE)
+ {
+ ddep.setInvoker(invokerJSE);
+ }
}
- if (depType == DeploymentType.JAXWS_JSE)
- {
- ddep.setInvoker(invokerJSE);
- }
-
processWSDDContribution(ddep, (ArchiveDeployment)dep);
log.info("Add " + ddep);
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2011-06-13
10:31:35 UTC (rev 14533)
@@ -142,6 +142,63 @@
</fileset>
</jar>
+ <!-- jaxws-jms-only-deployment -->
+ <jar
destfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-only-deployment.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms/HelloWorld*.class"/>
+ </fileset>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/cxf/jms/META-INF-as7">
+ <include name="wsdl/**/*" />
+ </metainf>
+ <manifest>
+ <attribute name="Dependencies" value="org.hornetq"/>
+ </manifest>
+ </jar>
+
+ <!-- jaxws-jms-http-deployment -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-http-deployment.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/jms_http/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld*.class"/>
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorld*.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/test-resources/jaxws/cxf/jms_http/WEB-INF">
+ <include name="wsdl/**"/>
+ </webinf>
+ <manifest>
+ <attribute name="Dependencies" value="org.hornetq"/>
+ </manifest>
+ </war>
+
+ <!-- jaxws-jms-only-deployment-test-servlet -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-only-deployment-test-servlet.war"
+ needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.class"/>
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms/HelloWorld.class"/>
+ </classes>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/cxf/jms/META-INF-as7/wsdl"
+ prefix="WEB-INF/classes/META-INF/wsdl"/>
+ <manifest>
+ <attribute name="Dependencies"
value="org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq"/>
+ </manifest>
+ </war>
+
+ <!-- jaxws-jms-http-deployment-test-servlet -->
+ <war
warfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-http-deployment-test-servlet.war"
+ needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.class"/>
+ <include
name="org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.class"/>
+ </classes>
+ <zipfileset
+
dir="${tests.output.dir}/test-resources/jaxws/cxf/jms_http/WEB-INF/wsdl"
+ prefix="WEB-INF/classes/META-INF/wsdl"/>
+ <manifest>
+ <attribute name="Dependencies"
value="org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-webserviceref.war"
webxml="${tests.output.dir}/test-resources/jaxws/cxf/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/DeploymentTestServlet.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class DeploymentTestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ try
+ {
+ boolean result;
+ URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ //start a new bus to avoid affecting the one that could already be assigned to
this thread
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try
+ {
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
+ Service service = Service.create(wsdlUrl, serviceName);
+
+ //JMS test
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
+ result = "Hi".equals(proxy.echo("Hi"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ res.getWriter().print(result);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ throw new ServletException(t);
+ }
+ }
+}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCase.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -62,7 +62,7 @@
public void testClientSide() throws Exception
{
if (!isTargetJBoss6()) {
- System.out.println("FIXME: can't lookup ConnectionFactory, remote JNDI
binding not available on AS7");
+ System.out.println("FIXME: can't lookup ConnectionFactory, remote JNDI
binding not available yet on AS7");
return;
}
URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
@@ -73,7 +73,7 @@
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
Service service = Service.create(wsdlUrl, serviceName);
- HelloWorld proxy = (HelloWorld) service.getPort(HelloWorld.class);
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
assertEquals("Hi", proxy.echo("Hi"));
}
finally
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCase.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) endpoint only
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Jun-2011
+ */
+public class JMSEndpointOnlyDeploymentTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(JMSEndpointOnlyDeploymentTestCase.class,
"jaxws-cxf-jms-only-deployment-test-servlet.war,jaxws-cxf-jms-only-deployment.jar");
+ }
+
+ public void testJMSEndpointServerSide() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-only-deployment-test-servlet");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("true", br.readLine());
+ }
+
+ public void testJMSEndpointClientSide() throws Exception
+ {
+ if (!isTargetJBoss6())
+ {
+ System.out.println("FIXME: can't lookup ConnectionFactory, remote JNDI
binding not available yet on AS7");
+ return;
+ }
+ URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
+ assertEquals("Hi", proxy.echo("Hi"));
+ }
+}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/TestServlet.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -59,7 +59,7 @@
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
Service service = Service.create(wsdlUrl, serviceName);
- HelloWorld proxy = (HelloWorld) service.getPort(HelloWorld.class);
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
result = "Hi".equals(proxy.echo("Hi"));
}
finally
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.cxf.jms_http;
-
-import java.io.IOException;
-import java.net.URL;
-
-import javax.servlet.ServletException;
-import javax.servlet.annotation.WebServlet;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-
-@WebServlet(name = "TestServlet", urlPatterns = "/*")
-public class DeploymentTestServlet extends HttpServlet
-{
- private static final long serialVersionUID = 1L;
-
- @Override
- protected void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
- {
- try
- {
- boolean result;
- URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
- //start a new bus to avoid affecting the one that could already be assigned to
this thread
- Bus bus = BusFactory.newInstance().createBus();
- BusFactory.setThreadDefaultBus(bus);
- try
- {
- QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
- Service service = Service.create(wsdlUrl, serviceName);
-
- //JMS test
- HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
- result = "Hi".equals(proxy.echo("Hi"));
- //HTTP test
- HelloWorld httpProxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"),
HelloWorld.class);
- result = result && "(http)
Hi".equals(httpProxy.echo("Hi"));
- }
- finally
- {
- bus.shutdown(true);
- }
- res.getWriter().print(result);
- }
- catch (Throwable t)
- {
- t.printStackTrace();
- throw new ServletException(t);
- }
- }
-}
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms_http;
+
+import java.io.IOException;
+import java.net.URL;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+
+@WebServlet(name = "TestServlet", urlPatterns = "/*")
+public class DeploymentTestServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
+ {
+ try
+ {
+ boolean result;
+ URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ //start a new bus to avoid affecting the one that could already be assigned to
this thread
+ Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try
+ {
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
+ Service service = Service.create(wsdlUrl, serviceName);
+
+ //JMS test
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
+ result = "Hi".equals(proxy.echo("Hi"));
+ //HTTP test
+ HelloWorld httpProxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"),
HelloWorld.class);
+ result = result && "(http)
Hi".equals(httpProxy.echo("Hi"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ res.getWriter().print(result);
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ throw new ServletException(t);
+ }
+ }
+}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.cxf.jms_http;
-
-import javax.jws.WebService;
-
-@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms")
-public interface HelloWorld
-{
- String echo(String input);
-}
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,30 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms")
+public interface HelloWorld
+{
+ String echo(String input);
+}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.cxf.jms_http;
-
-import javax.jws.WebService;
-
-@WebService
-(
- portName = "HelloWorldImplPort",
- serviceName = "HelloWorldService",
- wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
- endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
- targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
-)
-public class HelloWorldImpl implements HelloWorld
-{
- public String echo(String input)
- {
- System.out.println("input: " + input);
- return input;
- }
-}
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorldImpl.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "HelloWorldImplPort",
+ serviceName = "HelloWorldService",
+ wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
+)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input: " + input);
+ return input;
+ }
+}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.cxf.jms_http;
-
-import javax.jws.WebService;
-
-@WebService
-(
- portName = "HttpHelloWorldImplPort",
- serviceName = "HelloWorldService",
- wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
- endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
- targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
-)
-public class HttpHelloWorldImpl implements HelloWorld
-{
- public String echo(String input)
- {
- System.out.println("input (http): " + input);
- return "(http) " + input;
- }
-}
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/HttpHelloWorldImpl.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms_http;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ portName = "HttpHelloWorldImplPort",
+ serviceName = "HelloWorldService",
+ wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jms_http.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jms"
+)
+public class HttpHelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ System.out.println("input (http): " + input);
+ return "(http) " + input;
+ }
+}
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.cxf.jms_http;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSCXFTestSetup;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) and a HTTP endpoints
- *
- * @author alessio.soldano(a)jboss.com
- * @since 10-Jun-2011
- */
-public final class JMSHTTPEndpointDeploymentTestCase extends JBossWSTest
-{
- public static Test suite()
- {
- return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCase.class,
"jaxws-cxf-jms-http-deployment-test-servlet.war,jaxws-cxf-jms-http-deployment.war");
- }
-
- public void testJMSEndpointServerSide() throws Exception
- {
- URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment-test-servlet");
- BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
- assertEquals("true", br.readLine());
- }
-
- public void testJMSEndpointClientSide() throws Exception
- {
- if (!isTargetJBoss6())
- {
- System.out.println("FIXME: can't lookup ConnectionFactory, remote JNDI
binding not available yet on AS7");
- return;
- }
- URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
-
- Service service = Service.create(wsdlUrl, serviceName);
- HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
- assertEquals("Hi", proxy.echo("Hi"));
- }
-
- public void testHTTPEndpointClientSide() throws Exception
- {
- URL wsdlUrl = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
-
- Service service = Service.create(wsdlUrl, serviceName);
- HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"),
HelloWorld.class);
- assertEquals("(http) Hi", proxy.echo("Hi"));
- }
-}
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCase.java 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.cxf.jms_http;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test case for deploying an archive with a JMS (SOAP-over-JMS 1.0) and a HTTP endpoints
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 10-Jun-2011
+ */
+public final class JMSHTTPEndpointDeploymentTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCase.class,
"jaxws-cxf-jms-http-deployment-test-servlet.war,jaxws-cxf-jms-http-deployment.war");
+ }
+
+ public void testJMSEndpointServerSide() throws Exception
+ {
+ URL url = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment-test-servlet");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertEquals("true", br.readLine());
+ }
+
+ public void testJMSEndpointClientSide() throws Exception
+ {
+ if (!isTargetJBoss6())
+ {
+ System.out.println("FIXME: can't lookup ConnectionFactory, remote JNDI
binding not available yet on AS7");
+ return;
+ }
+ URL wsdlUrl =
Thread.currentThread().getContextClassLoader().getResource("META-INF/wsdl/HelloWorldService.wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldImplPort"),
HelloWorld.class);
+ assertEquals("Hi", proxy.echo("Hi"));
+ }
+
+ public void testHTTPEndpointClientSide() throws Exception
+ {
+ URL wsdlUrl = new URL("http://" + getServerHost() +
":8080/jaxws-cxf-jms-http-deployment?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms",
"HelloWorldService");
+
+ Service service = Service.create(wsdlUrl, serviceName);
+ HelloWorld proxy = (HelloWorld) service.getPort(new
QName("http://org.jboss.ws/jaxws/cxf/jms", "HttpHelloWorldImplPort"),
HelloWorld.class);
+ assertEquals("(http) Hi", proxy.echo("Hi"));
+ }
+}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF-as7/wsdl/HelloWorldService.wsdl
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF-as7/wsdl/HelloWorldService.wsdl 2011-06-13
10:29:22 UTC (rev 14532)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms/META-INF-as7/wsdl/HelloWorldService.wsdl 2011-06-13
10:31:35 UTC (rev 14533)
@@ -50,10 +50,25 @@
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
+ <wsdl:binding name="HttpHelloWorldServiceSoapBinding"
type="tns:HelloWorld">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
<wsdl:service name="HelloWorldService">
<soapjms:jndiConnectionFactoryName>java:/ConnectionFactory</soapjms:jndiConnectionFactoryName>
<wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
<soap:address location="jms:queue:testQueue"/>
</wsdl:port>
+ <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding"
name="HttpHelloWorldImplPort">
+ <soap:address location="http://host:port"/><!-- will be
rewritten at deploy time -->
+ </wsdl:port>
</wsdl:service>
</wsdl:definitions>
\ No newline at end of file
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <servlet>
- <servlet-name>EndpointServlet</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>EndpointServlet</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
-
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/web.xml 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>EndpointServlet</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.cxf.jms_http.HttpHelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>EndpointServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Deleted:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
===================================================================
---
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2011-06-10
16:11:09 UTC (rev 14515)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2011-06-13
10:31:35 UTC (rev 14533)
@@ -1,74 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<wsdl:definitions name="HelloWorldService"
targetNamespace="http://org.jboss.ws/jaxws/cxf/jms"
-
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
-
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
-
xmlns:soapjms="http://www.w3.org/2010/soapjms/"
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
-<xs:schema elementFormDefault="unqualified"
targetNamespace="http://org.jboss.ws/jaxws/cxf/jms" version="1.0"
xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
-<xs:element name="echo" type="tns:echo"/>
-<xs:element name="echoResponse" type="tns:echoResponse"/>
-<xs:complexType name="echo">
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0"
type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-<xs:complexType name="echoResponse">
- <xs:sequence>
- <xs:element minOccurs="0" name="return"
type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-</xs:schema>
- </wsdl:types>
- <wsdl:message name="echoResponse">
- <wsdl:part element="tns:echoResponse" name="parameters">
- </wsdl:part>
- </wsdl:message>
- <wsdl:message name="echo">
- <wsdl:part element="tns:echo" name="parameters">
- </wsdl:part>
- </wsdl:message>
- <wsdl:portType name="HelloWorld">
- <wsdl:operation name="echo">
- <wsdl:input message="tns:echo" name="echo">
- </wsdl:input>
- <wsdl:output message="tns:echoResponse"
name="echoResponse">
- </wsdl:output>
- </wsdl:operation>
- </wsdl:portType>
- <wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
- <soap:binding style="document"
transport="http://www.w3.org/2010/soapjms/"/>
- <wsdl:operation name="echo">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="echo">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="echoResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:binding name="HttpHelloWorldServiceSoapBinding"
type="tns:HelloWorld">
- <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
- <wsdl:operation name="echo">
- <soap:operation soapAction="" style="document"/>
- <wsdl:input name="echo">
- <soap:body use="literal"/>
- </wsdl:input>
- <wsdl:output name="echoResponse">
- <soap:body use="literal"/>
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
- <wsdl:service name="HelloWorldService">
-
<soapjms:jndiConnectionFactoryName>java:/ConnectionFactory</soapjms:jndiConnectionFactoryName>
- <wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
- <soap:address location="jms:queue:testQueue"/>
- </wsdl:port>
- <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding"
name="HttpHelloWorldImplPort">
- <soap:address
location="http://localhost:8080/jaxws-cxf-jms-http-deployment"/>
- </wsdl:port>
- </wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
Copied:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
(from rev 14515,
stack/cxf/branches/JBWS-3125/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl)
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl 2011-06-13
10:31:35 UTC (rev 14533)
@@ -0,0 +1,74 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<wsdl:definitions name="HelloWorldService"
targetNamespace="http://org.jboss.ws/jaxws/cxf/jms"
+
xmlns:ns1="http://schemas.xmlsoap.org/soap/http"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:soapjms="http://www.w3.org/2010/soapjms/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+<xs:schema elementFormDefault="unqualified"
targetNamespace="http://org.jboss.ws/jaxws/cxf/jms" version="1.0"
xmlns:tns="http://org.jboss.ws/jaxws/cxf/jms"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="echo" type="tns:echo"/>
+<xs:element name="echoResponse" type="tns:echoResponse"/>
+<xs:complexType name="echo">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="arg0"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+<xs:complexType name="echoResponse">
+ <xs:sequence>
+ <xs:element minOccurs="0" name="return"
type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="echoResponse">
+ <wsdl:part element="tns:echoResponse" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="echo">
+ <wsdl:part element="tns:echo" name="parameters">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="echo">
+ <wsdl:input message="tns:echo" name="echo">
+ </wsdl:input>
+ <wsdl:output message="tns:echoResponse"
name="echoResponse">
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="HelloWorldServiceSoapBinding"
type="tns:HelloWorld">
+ <soap:binding style="document"
transport="http://www.w3.org/2010/soapjms/"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="HttpHelloWorldServiceSoapBinding"
type="tns:HelloWorld">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="echo">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="echo">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="echoResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldService">
+
<soapjms:jndiConnectionFactoryName>java:/ConnectionFactory</soapjms:jndiConnectionFactoryName>
+ <wsdl:port binding="tns:HelloWorldServiceSoapBinding"
name="HelloWorldImplPort">
+ <soap:address location="jms:queue:testQueue"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HttpHelloWorldServiceSoapBinding"
name="HttpHelloWorldImplPort">
+ <soap:address
location="http://localhost:8080/jaxws-cxf-jms-http-deployment"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-13 10:29:22 UTC (rev 14532)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-06-13 10:31:35 UTC (rev 14533)
@@ -728,6 +728,11 @@
<!-- # [JBWS-3205] JDKLogManager not used -->
<exclude>org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase*</exclude>
+
+ <!-- # [JBWS-3125] SOAP over JMS 1.0 deployment support available on
AS 7 only -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jms/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/cxf/jms_http/**</exclude>
+
</excludes>
</configuration>
</plugin>
@@ -877,6 +882,11 @@
<!-- # [JBWS-3205] JDKLogManager not used -->
<exclude>org/jboss/test/ws/jaxws/cxf/logging/JDKLoggingTestCase*</exclude>
+
+ <!-- # [JBWS-3125] SOAP over JMS 1.0 deployment support available on
AS 7 only -->
+ <exclude>org/jboss/test/ws/jaxws/cxf/jms/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/cxf/jms_http/**</exclude>
+
</excludes>
</configuration>
</plugin>