Author: alessio.soldano(a)jboss.com
Date: 2011-06-14 06:39:08 -0400 (Tue, 14 Jun 2011)
New Revision: 14543
Removed:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorParserImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmsendpoints/
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/resources/jaxws/samples/jmstransport/fromjava/
Modified:
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as7.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml
Log:
[JBWS-3312][JBWS-3307] Removing old JMS descriptor abstraction, updating testsuite, etc.
Deleted:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspect.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.wsf.stack.cxf.deployment.aspect;
-
-import org.jboss.ws.common.integration.JMSDeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.stack.cxf.client.util.SpringUtils;
-
-/**
- * To start the jms endpoints
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JMSEndpointDeploymentAspect extends JMSDeploymentAspect
-{
- private JMSEndpointDeploymentAspectDelegate aspect;
-
- public JMSEndpointDeploymentAspect()
- {
- if (SpringUtils.SPRING_AVAILABLE)
- {
- aspect = new JMSEndpointDeploymentAspectDelegate();
- }
- }
-
-
- @Override
- public void start(Deployment dep)
- {
- if (aspect != null)
- {
- aspect.start(dep);
- }
- }
-
- public void stop(Deployment dep)
- {
- if (aspect != null)
- {
- aspect.stop(dep);
- }
- }
-}
-
Deleted:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/JMSEndpointDeploymentAspectDelegate.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.wsf.stack.cxf.deployment.aspect;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.jboss.ws.common.integration.JMSDeploymentAspect;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
-import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory;
-import org.jboss.wsf.stack.cxf.config.CXFInitializer;
-
-/**
- * To start the jms endpoints
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JMSEndpointDeploymentAspectDelegate extends JMSDeploymentAspect
-{
- @Override
- public void start(Deployment dep)
- {
- //ensure the default bus has been set on the server, then proceed
- CXFInitializer.waitForDefaultBusAvailability();
- //TODO:handler JAXBIntro
- if (dep.getAttachment(JMSEndpointsMetaData.class) != null)
- {
- JMSEndpointsMetaData jmsEndpoints =
dep.getAttachment(JMSEndpointsMetaData.class);
- URL url = jmsEndpoints.getDescriptorURL();
-
- ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
- try
- {
- SecurityActions.setContextClassLoader(dep.getRuntimeClassLoader());
- Bus bus = new JBossWSSpringBusFactory().createBus(url);
- dep.addAttachment(Bus.class, bus);
- }
- catch (Exception e)
- {
- log.error("Failed to deploy jms endpoints deployment " + url);
- throw new RuntimeException(e);
- }
-
- finally
- {
- BusFactory.setThreadDefaultBus(null);
- SecurityActions.setContextClassLoader(origClassLoader);
- }
- }
- }
-
- @Override
- public void stop(Deployment dep)
- {
- log.debugf("Undeploying jms endpoints in %s", dep.getSimpleName());
- if (dep.getAttachment(Bus.class) != null)
- {
- Bus bus = dep.getAttachment(Bus.class);
- bus.shutdown(false);
- }
- }
-}
-
Deleted:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorParserImpl.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorParserImpl.java 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorParserImpl.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.wsf.stack.cxf.deployment.jms;
-
-import java.net.URL;
-
-import org.jboss.wsf.spi.metadata.jms.JMSDescriptorParser;
-import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
-
-/**
- * JMS descriptor processor implementation.
- *
- * @author <a href="ropalka(a)redhat.com">Richard Opalka</a>
- */
-public final class JMSDescriptorParserImpl implements JMSDescriptorParser
-{
- private String descriptorName;
-
- @Override
- public String getDescriptorName()
- {
- return this.descriptorName;
- }
-
- /**
- * Invoked via MC.
- * @param descriptorName
- */
- public void setDescriptorName(final String descriptorName)
- {
- this.descriptorName = descriptorName;
- }
-
- @Override
- public JMSEndpointsMetaData parse(URL url)
- {
- return JMSEndpointsFactory.load(url);
- }
-}
Deleted:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSDescriptorProcessorImpl.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,86 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.wsf.stack.cxf.deployment.jms;
-
-import java.net.URL;
-
-import org.jboss.wsf.spi.metadata.jms.JMSDescriptorProcessor;
-import org.jboss.xb.binding.ObjectModelFactory;
-
-/**
- * JMS descriptor processor implementation.
- *
- * @author <a href="ropalka(a)redhat.com">Richard Opalka</a>
- */
-@Deprecated
-public final class JMSDescriptorProcessorImpl implements JMSDescriptorProcessor
-{
- private String descriptorName;
- private boolean isValidating;
-
- /* (non-Javadoc)
- * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#getDescriptorName()
- */
- @Override
- public String getDescriptorName()
- {
- return this.descriptorName;
- }
-
- /**
- * Invoked via MC.
- * @param descriptorName
- */
- public void setDescriptorName(final String descriptorName)
- {
- this.descriptorName = descriptorName;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#getFactory(java.net.URL)
- */
- public ObjectModelFactory getFactory(final URL url)
- {
- if (url == null)
- throw new IllegalArgumentException("URL cannot be null");
-
- return new JMSEndpointsFactory(url);
- }
-
- /* (non-Javadoc)
- * @see org.jboss.wsf.spi.metadata.DescriptorProcessor#isValidating()
- */
- @Override
- public boolean isValidating()
- {
- return this.isValidating;
- }
-
- /**
- * Invoked via MC.
- * @param isValidating
- */
- public void setValidating(final boolean isValidating)
- {
- this.isValidating = isValidating;
- }
-}
Deleted:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/jms/JMSEndpointsFactory.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.wsf.stack.cxf.deployment.jms;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.wsf.spi.metadata.jms.JMSEndpointMetaData;
-import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * JMS Endpoints OjbectModelFactory
- *
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JMSEndpointsFactory implements ObjectModelFactory
-{
- private URL descriptorURL;
-
- public JMSEndpointsFactory(URL descriptorURL)
- {
- this.descriptorURL = descriptorURL;
- }
-
- public static JMSEndpointsMetaData load(URL url)
- {
- InputStream is = null;
- try
- {
- is = url.openStream();
- Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new JMSEndpointsFactory(url);
- return (JMSEndpointsMetaData) unmarshaller.unmarshal(is, factory, null);
- }
- catch (Exception e)
- {
- throw new WebServiceException(e);
- }
- finally
- {
- if (is != null)
- {
- try
- {
- is.close();
- }
- catch (Exception e)
- {
- } //ignore
- }
- }
- }
-
- /**
- * This method is called on the factory by the object model builder when the parsing
starts.
- *
- * @return the root of the object model.
- */
- public Object newRoot(Object root, UnmarshallingContext navigator, String
namespaceURI, String localName,
- Attributes attrs)
- {
- return new JMSEndpointsMetaData(descriptorURL);
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String
name)
- {
- return root;
- }
-
- /**
- * Called when parsing of a new element started.
- */
- public Object newChild(JMSEndpointsMetaData endpoints, UnmarshallingContext navigator,
String namespaceURI,
- String localName, Attributes attrs)
- {
- if ("endpoint".equals(localName) && isJMSEndpoint(attrs))
- {
- JMSEndpointMetaData endpoint = new JMSEndpointMetaData(endpoints);
- endpoint.setName(attrs.getValue("name"));
- endpoint.setImplementor(attrs.getValue("implementor"));
- endpoint.setEndpointName(attrs.getValue("endpointName"));
- endpoint.setWsdlLocation(attrs.getValue("wsdlLocation"));
- return endpoint;
- }
- else
- return null;
- }
-
- private boolean isJMSEndpoint(final Attributes attrs)
- {
- if (attrs == null)
- return false;
- if (attrs.getValue("transportId") == null)
- return false;
-
- return
attrs.getValue("transportId").equals("http://cxf.apache.or...;
- }
-
- /**
- * Called when parsing character is complete.
- */
- public void addChild(JMSEndpointsMetaData endpoints, JMSEndpointMetaData
endpointMetaData, UnmarshallingContext navigator, String namespaceURI,
- String localName)
- {
- endpoints.addEndpointMetaData(endpointMetaData);
- }
-}
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml
===================================================================
---
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as6.xml 2011-06-14
10:39:08 UTC (rev 14543)
@@ -24,10 +24,6 @@
<property name="descriptorName">webservices.xml</property>
</bean>
- <bean name="CXFJMSDescriptorParser"
class="org.jboss.wsf.stack.cxf.deployment.jms.JMSDescriptorParserImpl">
- <property name="descriptorName">jbossws-cxf.xml</property>
- </bean>
-
<!-- Installed Record Processors-->
<bean name="WSMemoryBufferRecorder"
class="org.jboss.ws.common.monitoring.MemoryBufferRecorder">
<property name="recording">false</property>
@@ -94,15 +90,4 @@
<property name="forJaxRpc">false</property>
</bean>
- <!---JMSEndpoints Deployment Aspect-->
- <bean name="JMSEndpointDeploymentAspect"
class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspect">
- <property name="provides">BusHolder</property>
- <property name="forJaxRpc">false</property>
- </bean>
-
- <bean name="JMSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointRegistryDeploymentAspect">
- <property name="requires">BusHolder</property>
- <property name="forJaxRpc">false</property>
- </bean>
-
</deployment>
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as7.xml
===================================================================
---
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as7.xml 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-config-as7.xml 2011-06-14
10:39:08 UTC (rev 14543)
@@ -70,17 +70,6 @@
</deploymentAspect>
<!--
-
- <deploymentAspect
class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointDeploymentAspect">
- <property name="provides"
class="java.lang.String">BusHolder</property>
- <property name="forJaxRpc"
class="boolean">false</property>
- </deploymentAspect>
-
- <deploymentAspect
class="org.jboss.wsf.stack.cxf.deployment.aspect.JMSEndpointRegistryDeploymentAspect">
- <property name="requires"
class="java.lang.String">BusHolder</property>
- <property name="forJaxRpc"
class="boolean">false</property>
- </deploymentAspect>
-
<deploymentAspect
class="org.jboss.ws.common.deployment.EndpointRecordProcessorDeploymentAspect">
<property name="mbeanServer"><inject
bean="WSMBeanServerLocator"
property="mbeanServer"/></property>
<property name="requires"
class="java.lang.String">RegisteredEndpoint</property>
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 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-samples-jaxws.xml 2011-06-14
10:39:08 UTC (rev 14543)
@@ -35,44 +35,6 @@
</webinf>
</war>
- <!-- jms transport from java for as6 -->
-
- <jar
jarfile="${tests.output.dir}/test-libs/hornetq-fromjava-jmsendpoints-as6.sar">
- <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
- <include name="hornetq-jms.xml"/>
- </fileset>
- </jar>
-
- <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/fromjava/META-INF">
- <include name="jbossws-cxf.xml"/>
- <include name="jboss-dependency.xml"/>
- </metainf>
- </jar>
-
- <!-- jms endpoints sample-->
-
- <jar
jarfile="${tests.output.dir}/test-libs/hornetq-jmsendpoints-as6.sar">
- <fileset
dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
- <include name="hornetq-jms.xml"/>
- </fileset>
- </jar>
-
- <jar
jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmsendpoints-as6.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include
name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/Organization.class"/>
- <include
name="org/jboss/test/ws/jaxws/samples/jmsendpoints/jmstransport/OrganizationJmsEndpoint.class"/>
- </fileset>
- <metainf
dir="${tests.output.dir}/test-resources/jaxws/samples/jmsendpoints/META-INF">
- <include name="jbossws-cxf.xml"/>
- <include name="jboss-dependency.xml"/>
- </metainf>
- </jar>
-
<!-- jaxws-samples-wsrm -->
<war
warfile="${tests.output.dir}/test-libs/jaxws-samples-wsrm.war"
Deleted:
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 2011-06-14
10:35:43 UTC (rev 14542)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/jmstransport/FromJavaJMSTransportTestCase.java 2011-06-14
10:39:08 UTC (rev 14543)
@@ -1,133 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.samples.jmstransport;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueReceiver;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
-
-import org.jboss.ws.common.DOMUtils;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * The test for cxf java first jms transport
- *
- * @author <a href=mailto:ema@redhat.com> Jim Ma </a>
- */
-public class FromJavaJMSTransportTestCase extends JBossWSTest
-{
- private static boolean waitForResponse;
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(FromJavaJMSTransportTestCase.class,
- "hornetq-fromjava-jmsendpoints-as6.sar,
jaxws-fromjava-jmsendpoints-as6.jar");
- }
-
- public void testMessagingClient() throws Exception
- {
- String reqMessage =
- "<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
- "<env:Body>" +
- "<ns1:getContactInfo
xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
- "<arg0>mafia</arg0>" +
- "</ns1:getContactInfo>" +
- "</env:Body>" +
- "</env:Envelope>";
-
- String resMessage =
- "<soap:Envelope
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
- "<soap:Body>" +
- "<ns1:getContactInfoResponse
xmlns:ns1='http://org.jboss.ws/samples/jmstransport'>" +
- "<return>The 'mafia' boss is currently out of
office, please call again.</return>" +
- "</ns1:getContactInfoResponse>" +
- "</soap:Body>" +
- "</soap:Envelope>";
-
- InitialContext context = new InitialContext();
- QueueConnectionFactory connectionFactory =
(QueueConnectionFactory)context.lookup("ConnectionFactory");
- Queue reqQueue = (Queue)context.lookup("queue/RequestQueue");
- Queue resQueue = (Queue)context.lookup("queue/ResponseQueue");
-
- QueueConnection con = connectionFactory.createQueueConnection();
- QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- QueueReceiver receiver = session.createReceiver(resQueue);
- ResponseListener responseListener = new ResponseListener();
- receiver.setMessageListener(responseListener);
- con.start();
-
- TextMessage message = session.createTextMessage(reqMessage);
- message.setJMSReplyTo(resQueue);
-
- waitForResponse = true;
-
- QueueSender sender = session.createSender(reqQueue);
- sender.send(message);
- sender.close();
-
- int timeout = 5;
- while (waitForResponse && timeout > 0)
- {
- Thread.sleep(1000);
- timeout = timeout -1;
- }
-
- assertNotNull("Expected response message", responseListener.resMessage);
- assertEquals(DOMUtils.parse(resMessage),
DOMUtils.parse(responseListener.resMessage));
-
- sender.close();
- receiver.close();
- con.stop();
- session.close();
- con.close();
- }
-
- public static class ResponseListener implements MessageListener
- {
- public String resMessage;
-
- public void onMessage(Message msg)
- {
- TextMessage textMessage = (TextMessage)msg;
- try
- {
- resMessage = textMessage.getText();
- waitForResponse = false;
- }
- catch (Throwable t)
- {
- t.printStackTrace();
- }
- }
- }
-}