Author: jim.ma
Date: 2010-09-26 07:07:55 -0400 (Sun, 26 Sep 2010)
New Revision: 13027
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/hornetq-jms.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jbossws-cxf.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/hornetq-jms.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml
Log:
[JBWS-3127]:Updated the JMSTransportTestCase
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -29,53 +29,25 @@
<include name="jboss-web.xml"/>
</webinf>
</war>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-jmstransport.war"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
+
<jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport-as6.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-samples-jmstransport.war"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
+ <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
<include name="hornetq-jms.xml"/>
- </metainf>
+ </fileset>
</jar>
-
- <!-- jaxws-fromjava-jmstransport -->
- <war
- warfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmstransport.war"
-
webxml="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/fromjava/WEB-INF/web.xml">
- <classes dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsImpl.class"/>
- </classes>
- <webinf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/fromjava/WEB-INF">
- <include name="jbossws-cxf.xml"/>
- <include name="jboss-web.xml"/>
- </webinf>
- </war>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmstransport.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-fromjava-jmstransport.war"/>
+
+ <jar
jarfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmsendpoints-as6.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/Organization.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/jmstransport/OrganizationJmsImpl.class"/>
</fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="jboss-service.xml"/>
- </metainf>
- </jar>
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-fromjava-jmstransport-as6.sar">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-fromjava-jmstransport.war"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/META-INF">
- <include name="hornetq-jms.xml"/>
- </metainf>
+ <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmstransport/fromjava/META-INF">
+ <include name="hornetq-jms.xml"/>
+ <include name="jbossws-cxf.xml"/>
+ </metainf>
</jar>
+
<!-- jms endpoints sample-->
<!-- jms transport from java for as6 -->
<jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmsendpoints-as6.jar">
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2010-09-26
11:07:55 UTC (rev 13027)
@@ -35,7 +35,9 @@
import javax.naming.InitialContext;
import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport.JMSEndpointsTestCase;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
@@ -50,10 +52,19 @@
public class FromJavaJMSTransportTestCase extends JBossWSTest
{
private static boolean waitForResponse;
-
- public static Test suite() throws Exception
+
+ public static Test suite() throws Exception
{
- return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
isHornetQAvailable() ? "jaxws-fromjava-jmstransport-as6.sar" :
"jaxws-fromjava-jmstransport.sar");
+ if (isHornetQAvailable())
+ {
+ return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
+ "jaxws-fromjava-jmsendpoints-as6.jar");
+ }
+ else
+ {
+ return new TestSuite();
+ }
+
}
private static boolean isHornetQAvailable()
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/JMSTransportTestCase.java 2010-09-26
11:07:55 UTC (rev 13027)
@@ -21,6 +21,7 @@
*/
package org.jboss.test.ws.jaxws.samples.jmstransport;
+import java.io.PrintWriter;
import java.net.URL;
import javax.jms.Message;
@@ -39,7 +40,16 @@
import javax.xml.ws.Service;
import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.ServiceImpl;
+import org.jboss.test.ws.jaxws.samples.jmsendpoints.jmstransport.JMSEndpointsTestCase;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
@@ -55,9 +65,18 @@
{
private static boolean waitForResponse;
- public static Test suite() throws Exception
+ public static Test suite() throws Exception
{
- return new JBossWSTestSetup(JMSTransportTestCase.class, isHornetQAvailable() ?
"jaxws-samples-jmstransport-as6.sar" :
"jaxws-samples-jmstransport.sar");
+ if (isHornetQAvailable())
+ {
+ return new JBossWSTestSetup(JMSTransportTestCase.class,
+ "jaxws-samples-jmstransport-as6.sar, jaxws-samples-jmstransport.war");
+ }
+ else
+ {
+ return new TestSuite();
+ }
+
}
private static boolean isHornetQAvailable()
@@ -74,15 +93,16 @@
}
}
- public void testJMSEndpointPort() throws Exception
+ public void testJMSEndpointPort() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-samples-jmstransport?wsdl");
QName serviceName = new QName("http://org.jboss.ws/samples/jmstransport",
"OrganizationService");
QName portName = new QName("http://org.jboss.ws/samples/jmstransport",
"JmsEndpointPort");
-
Service service = Service.create(wsdlURL, serviceName);
Organization port = service.getPort(portName, Organization.class);
-
+ Client c = ClientProxy.getClient(port);
+ c.getInInterceptors().add(new LoggingInInterceptor(new PrintWriter(System.out)));
+ c.getOutInterceptors().add(new LoggingOutInterceptor(new PrintWriter(System.out)));
String res = port.getContactInfo("mafia");
assertEquals("The 'mafia' boss is currently out of office, please call
again.", res);
}
@@ -177,4 +197,5 @@
}
}
}
+
}
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/hornetq-jms.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/hornetq-jms.xml 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/META-INF/hornetq-jms.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -1,10 +1,11 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+<configuration xmlns="urn:hornetq"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
<queue name="RequestQueue">
<entry name="/queue/RequestQueue"/>
</queue>
<queue name="ResponseQueue">
<entry name="/queue/ResponseQueue"/>
</queue>
+
</configuration>
\ No newline at end of file
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/jboss-web.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -4,4 +4,5 @@
<jboss-web>
<context-root>/jaxws-samples-jmstransport</context-root>
+
<depends>org.hornetq:name="RequestQueue",module=JMS,type=Queue</depends>
</jboss-web>
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml 2010-09-24
12:27:16 UTC (rev 13026)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/WEB-INF/web.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -9,23 +9,10 @@
<servlet-name>OrganizationService</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationHttpEndpoint</servlet-class>
<load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet>
- <servlet-name>OrganizationJmsService</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationJmsEndpoint</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
+ </servlet>
<servlet-mapping>
<servlet-name>OrganizationService</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>OrganizationJmsService</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
</web-app>
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/hornetq-jms.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/hornetq-jms.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/hornetq-jms.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -0,0 +1,11 @@
+<configuration xmlns="urn:hornetq"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+ <queue name="RequestQueue">
+ <entry name="/queue/RequestQueue"/>
+ </queue>
+ <queue name="ResponseQueue">
+ <entry name="/queue/ResponseQueue"/>
+ </queue>
+
+</configuration>
\ No newline at end of file
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jbossws-cxf.xml
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jbossws-cxf.xml
(rev 0)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jbossws-cxf.xml 2010-09-26
11:07:55 UTC (rev 13027)
@@ -0,0 +1,29 @@
+<beans
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jms="http://cxf.apache.org/transports/jms"
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xsi:schemaLocation='http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://www.w3.org/2006/07/ws-policy http://www.w3.org/2006/07/ws-policy.xsd
+
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+
http://cxf.apache.org/transports/jms
http://cxf.apache.org/schemas/configuration/jms.xsd'>
+
+ <jaxws:endpoint id='JMSQueryService'
+ implementor='org.jboss.test.ws.jaxws.samples.jmstransport.OrganizationJmsImpl'
+
transportId="http://cxf.apache.org/transports/jms">
+ </jaxws:endpoint>
+
+ <jms:conduit
+ name="{http://org.jboss.ws/samples/jmstransport}JmsPort.jms-conduit">
+ <jms:address destinationStyle="queue"
+ jndiConnectionFactoryName="ConnectionFactory"
jndiDestinationName="/queue/RequestQueue"
+ jndiReplyDestinationName="/queue/ResponseQueue">
+ </jms:address>
+ </jms:conduit>
+ <jms:destination
name="{http://org.jboss.ws/samples/jmstransport}JmsPort.jms-destination">
+ <jms:address destinationStyle="queue"
+ jndiConnectionFactoryName="ConnectionFactory"
jndiDestinationName="/queue/RequestQueue"
+ jndiReplyDestinationName="/queue/ResponseQueue">
+ </jms:address>
+ </jms:destination>
+</beans>
+
+
Property changes on:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/samples/jmstransport/fromjava/META-INF/jbossws-cxf.xml
___________________________________________________________________
Name: svn:mergeinfo
+