You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ul...@apache.org on 2008/07/24 11:12:42 UTC

svn commit: r679316 - in /cxf/branches/2.0.x-fixes: ./ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/main/resources/META-INF/cxf/ rt/transports/jms/src/main/resources/schemas/wsdl/ systests/src/test/java/org/apache...

Author: ulhasbhole
Date: Thu Jul 24 02:12:41 2008
New Revision: 679316

URL: http://svn.apache.org/viewvc?rev=679316&view=rev
Log:
Merged revisions 679247 via svnmerge from 
https://svn.eu.apache.org/repos/asf/cxf/trunk

........
  r679247 | ulhasbhole | 2008-07-24 01:37:00 +0100 (Thu, 24 Jul 2008) | 5 lines
  
  * Fix for JIRA : https://issues.apache.org/jira/browse/CXF-1701 and https://issues.apache.org/jira/browse/CXF-1704
  * Removed dead methods from JMSTransportBase.
  * Updated System Test.
........

Added:
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java
      - copied unchanged from r679247, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDocBase.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java
      - copied unchanged from r679247, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JmsDestPubSubImpl.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/SoapService6SoapPort6Impl.java
      - copied unchanged from r679247, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/SoapService6SoapPort6Impl.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java
      - copied unchanged from r679247, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/TwoWayJMSImplBase.java
Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/META-INF/cxf/extensions.xml
    cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterByteMessageImpl.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDoc.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
    cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/Server.java
    cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
    cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jms_test.wsdl

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java (original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSProviderHub.java Thu Jul 24 02:12:41 2008
@@ -23,6 +23,7 @@
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.QueueConnectionFactory;
+import javax.jms.Session;
 import javax.jms.TopicConnectionFactory;
 import javax.naming.Context;
 import javax.naming.NamingException;
@@ -65,13 +66,14 @@
         throws JMSException, NamingException {
 
         AddressType  addrDetails = jmsTransport.getJMSAddress();
+        boolean isQueue = JMSConstants.JMS_QUEUE.equals(addrDetails.getDestinationStyle().value());
       
         // get JMS connection resources and destination
         //
         Context context = JMSUtils.getInitialContext(addrDetails);
         Connection connection = null;
         
-        if (JMSConstants.JMS_QUEUE.equals(addrDetails.getDestinationStyle().value())) {
+        if (isQueue) {
             QueueConnectionFactory qcf =
                 (QueueConnectionFactory)context.lookup(addrDetails.getJndiConnectionFactoryName());
             if (addrDetails.isSetConnectionUserName()) {
@@ -100,11 +102,47 @@
         }
         connection.start();
 
-        Destination requestDestination = 
-                (Destination)context.lookup(addrDetails.getJndiDestinationName());
-
-        Destination replyDestination = (null != addrDetails.getJndiReplyDestinationName())
-            ? (Destination)context.lookup(addrDetails.getJndiReplyDestinationName()) : null;
+        Destination requestDestination = null;
+        try {
+            //see if jndiDestination is set
+            if (addrDetails.getJndiDestinationName() != null) {
+                requestDestination = 
+                    (Destination)context.lookup(addrDetails.getJndiDestinationName());    
+            }
+            
+            //if no jndiDestination or it fails see if jmsDestination is set and try to create it.
+            if (requestDestination == null && addrDetails.getJmsDestinationName() != null) {
+                if (isQueue) {
+                    requestDestination = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)
+                        .createQueue(addrDetails.getJmsDestinationName());    
+                } else {
+                    requestDestination = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)
+                        .createTopic(addrDetails.getJmsDestinationName());
+                }
+            }
+            
+            if (requestDestination == null) {
+                //fail to locate or create requestDestination throw Exception.
+                throw new JMSException("Failed to lookup or create requestDestination");
+            }
+            
+        } catch (NamingException ne) {
+            //Propogate NamingException.
+            throw ne;
+        }
+         
+        Destination replyDestination = null;
+        
+        //Reply Destination is used (if present) only if the session is point-to-point session 
+        if (isQueue) {
+            if (addrDetails.getJndiReplyDestinationName() != null) {
+                replyDestination = (Destination)context.lookup(addrDetails.getJndiReplyDestinationName());
+            } 
+            if (replyDestination == null && addrDetails.getJmsReplyDestinationName() != null) {
+                replyDestination = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)
+                    .createQueue(addrDetails.getJmsReplyDestinationName());
+            }
+        }
 
         // create session factory to manage session, reply destination,
         // producer and consumer pooling

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java (original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSTransportBase.java Thu Jul 24 02:12:41 2008
@@ -231,21 +231,6 @@
         }
     }
     
-    protected String getAddrUriFromJMSAddrPolicy() {
-        AddressType jmsAddressPolicy = transport.getJMSAddress();
-        return "jms:" + jmsAddressPolicy.getJndiConnectionFactoryName() 
-                        + "#"
-                        + jmsAddressPolicy.getJndiDestinationName();
-    }
-    
-    protected String getReplyTotAddrUriFromJMSAddrPolicy() {
-        AddressType jmsAddressPolicy = transport.getJMSAddress();
-        return "jms:" 
-                        + jmsAddressPolicy.getJndiConnectionFactoryName() 
-                        + "#"
-                        + jmsAddressPolicy.getJndiReplyDestinationName();
-    }
-
     protected boolean isDestinationStyleQueue() {
         return JMSConstants.JMS_QUEUE.equals(
             transport.getJMSAddress().getDestinationStyle().value());

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/META-INF/cxf/extensions.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/META-INF/cxf/extensions.xml?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/META-INF/cxf/extensions.xml (original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/META-INF/cxf/extensions.xml Thu Jul 24 02:12:41 2008
@@ -23,4 +23,7 @@
     <entry key="org.apache.cxf.transport.jms-1">javax.wsdl.Port=org.apache.cxf.transport.jms.AddressType</entry>
     <entry key="org.apache.cxf.transport.jms-2">javax.wsdl.Port=org.apache.cxf.transport.jms.ClientBehaviorPolicyType</entry>
     <entry key="org.apache.cxf.transport.jms-3">javax.wsdl.Port=org.apache.cxf.transport.jms.ServerBehaviorPolicyType</entry>
+    <entry key="org.apache.cxf.transport.jms-4">javax.wsdl.Port=org.apache.cxf.transport.jms.ClientConfig</entry>
+    <entry key="org.apache.cxf.transport.jms-5">javax.wsdl.Port=org.apache.cxf.transport.jms.ServerConfig</entry>
+    <entry key="org.apache.cxf.transport.jms-6">javax.wsdl.Port=org.apache.cxf.transport.jms.SessionPoolType</entry>
 </properties>

Modified: cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd (original)
+++ cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd Thu Jul 24 02:12:41 2008
@@ -33,23 +33,36 @@
     <xs:element name="clientConfig" type="jms:ClientConfig"/>
     <xs:element name="serverConfig" type="jms:ServerConfig"/>
     <xs:element name="address" type="jms:AddressType"/>
+    <xs:element name="sessionPool" type="jms:SessionPoolType"/>
 
     <xs:complexType name="SessionPoolType">
         <xs:annotation>
             <xs:documentation>JMS Session pool configuration policy</xs:documentation>
         </xs:annotation>
-        <xs:attribute name="lowWaterMark" type="xs:int" default="20"/>
-        <xs:attribute name="highWaterMark" type="xs:int" default="500" />
+        <xs:complexContent>
+            <xs:extension base="wsdl:tExtensibilityElement">
+        		<xs:attribute name="lowWaterMark" type="xs:int" default="20"/>
+        		<xs:attribute name="highWaterMark" type="xs:int" default="500" />
+        	</xs:extension>
+		</xs:complexContent>
     </xs:complexType>
     
     <xs:complexType name="ClientConfig">
-        <xs:attribute name="clientReceiveTimeout" type="xs:long" default="2000"/>
-        <xs:attribute name="messageTimeToLive" type="xs:long" default="0" />
+        <xs:complexContent>
+            <xs:extension base="wsdl:tExtensibilityElement">  
+				<xs:attribute name="clientReceiveTimeout" type="xs:long" default="2000"/>
+        		<xs:attribute name="messageTimeToLive" type="xs:long" default="0" />
+        	</xs:extension>
+		</xs:complexContent>        	
     </xs:complexType>
     
     <xs:complexType name="ServerConfig">
-        <xs:attribute name="messageTimeToLive" type="xs:long" default="0" />
-        <xs:attribute name="durableSubscriptionClientId" type="xs:string" />
+		<xs:complexContent>
+            <xs:extension base="wsdl:tExtensibilityElement">
+        		<xs:attribute name="messageTimeToLive" type="xs:long" default="0" />
+        		<xs:attribute name="durableSubscriptionClientId" type="xs:string" />
+			</xs:extension>
+		</xs:complexContent>        	
     </xs:complexType>
 
     <xs:complexType name="JMSPropertyType">
@@ -132,6 +145,7 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
+                
                 <xs:attribute name="jndiConnectionFactoryName" type="xs:string" use="required">
                     <xs:annotation>
                         <xs:documentation>
@@ -139,13 +153,22 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
-                <xs:attribute name="jndiDestinationName" type="xs:string" use="required">
+                <xs:attribute name="jndiDestinationName" type="xs:string">
                     <xs:annotation>
                         <xs:documentation>
                           Name of the JNDI Destination queue or topic.
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
+                
+                <xs:attribute name="jmsDestinationName" type="xs:string">
+                	<xs:annotation>
+                		<xs:documentation>
+                			JMS destination queue name or topic name.
+                		</xs:documentation>
+                	</xs:annotation>
+                </xs:attribute>
+                
                 <xs:attribute name="jndiReplyDestinationName" type="xs:string">
                     <xs:annotation>
                         <xs:documentation>
@@ -153,6 +176,15 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:attribute>
+                
+                <xs:attribute name="jmsReplyDestinationName" type="xs:string">
+                	<xs:annotation>
+                		<xs:documentation>
+                			JMS Replyto destination queue name when using static queues for reply.
+                		</xs:documentation>
+                	</xs:annotation>
+                </xs:attribute>
+                
                 <xs:attribute name="connectionUserName" type="xs:string">
                     <xs:annotation>
                         <xs:documentation>

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterByteMessageImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterByteMessageImpl.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterByteMessageImpl.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterByteMessageImpl.java Thu Jul 24 02:12:41 2008
@@ -18,21 +18,8 @@
  */
 package org.apache.cxf.systest.jms;
 
-import javax.annotation.Resource;
 import javax.jws.WebService;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
 
-import org.apache.cxf.hello_world_jms.BadRecordLitFault;
-import org.apache.cxf.hello_world_jms.HelloWorldPortType;
-import org.apache.cxf.hello_world_jms.NoSuchCodeLitFault;
-import org.apache.cxf.hello_world_jms.types.BadRecordLit;
-import org.apache.cxf.hello_world_jms.types.ErrorCode;
-import org.apache.cxf.hello_world_jms.types.NoSuchCodeLit;
-import org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse;
-import org.apache.cxf.transport.jms.JMSConstants;
-import org.apache.cxf.transport.jms.JMSMessageHeadersType;
-import org.apache.cxf.transport.jms.JMSPropertyType;
 
 
 
@@ -41,57 +28,6 @@
             endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
             targetNamespace = "http://cxf.apache.org/hello_world_jms",
             wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterByteMessageImpl implements HelloWorldPortType {
-    @Resource
-    protected WebServiceContext wsContext;
-    public String greetMe(String me) {
-        MessageContext mc = wsContext.getMessageContext();
-        JMSMessageHeadersType headers =
-            (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_REQUEST_HEADERS);
-        System.out.println("get the message headers JMSCorrelationID" + headers.getJMSCorrelationID());
-        System.out.println("Reached here :" + me);
-        
-        // set reply header custom property
-        JMSPropertyType testProperty = new JMSPropertyType();
-        testProperty.setName("Test_Prop");
-        testProperty.setValue("some return value "  + me);
-        
-        System.out.println("found property in request headers at index: " 
-                           + headers.getProperty().indexOf(testProperty));
-        
-        JMSMessageHeadersType responseHeaders =
-            (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS);
-        responseHeaders.getProperty().add(testProperty);
-        
-        return "Hello " + me;
-    }
-
-    public String sayHi() {        
-        return "Bonjour";
-    }
-    
-    public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);
-    }
-    
-    public TestRpcLitFaultResponse testRpcLitFault(String faultType) 
-        throws BadRecordLitFault, NoSuchCodeLitFault {
-        BadRecordLit badRecord = new BadRecordLit();
-        badRecord.setReason("BadRecordLitFault");
-        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
-            throw new BadRecordLitFault("TestBadRecordLit", badRecord);
-        }
-        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
-            ErrorCode ec = new ErrorCode();
-            ec.setMajor((short)1);
-            ec.setMinor((short)1);
-            NoSuchCodeLit nscl = new NoSuchCodeLit();
-            nscl.setCode(ec);
-            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
-        }
-        
-        return new TestRpcLitFaultResponse();
-    }
-    
+public class GreeterByteMessageImpl extends TwoWayJMSImplBase {    
     
 }

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDoc.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDoc.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDoc.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplDoc.java Thu Jul 24 02:12:41 2008
@@ -20,38 +20,12 @@
 
 import javax.jws.WebService;
 
-import org.apache.hello_world_doc_lit.Greeter;
-import org.apache.hello_world_doc_lit.PingMeFault;
-import org.apache.hello_world_doc_lit.types.FaultDetail;
-
 
 @WebService(serviceName = "SOAPService2", 
             portName = "SoapPort2", 
             endpointInterface = "org.apache.hello_world_doc_lit.Greeter",
             targetNamespace = "http://apache.org/hello_world_doc_lit",
             wsdlLocation = "testutils/hello_world_doc_lit.wsdl")
-public class GreeterImplDoc implements Greeter {
-
-    public String sayHi() {
-        System.out.println("Call sayHi here ");
-        return "Bonjour";
-    }
-
-    public String greetMe(String requestType) {
-        System.out.println("Reached here :" + requestType);
-        return "Hello " + requestType;
-    }
-
-    public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);        
-    }
-
-    public void pingMe() throws PingMeFault {
-        FaultDetail faultDetail = new FaultDetail();
-        faultDetail.setMajor((short)2);
-        faultDetail.setMinor((short)1);
-        throw new PingMeFault("PingMeFault raised by server", faultDetail);
-        
-    }
+public class GreeterImplDoc extends GreeterImplDocBase {
 
 }

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java Thu Jul 24 02:12:41 2008
@@ -18,21 +18,7 @@
  */
 package org.apache.cxf.systest.jms;
 
-import javax.annotation.Resource;
 import javax.jws.WebService;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.apache.cxf.hello_world_jms.BadRecordLitFault;
-import org.apache.cxf.hello_world_jms.HelloWorldPortType;
-import org.apache.cxf.hello_world_jms.NoSuchCodeLitFault;
-import org.apache.cxf.hello_world_jms.types.BadRecordLit;
-import org.apache.cxf.hello_world_jms.types.ErrorCode;
-import org.apache.cxf.hello_world_jms.types.NoSuchCodeLit;
-import org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse;
-import org.apache.cxf.transport.jms.JMSConstants;
-import org.apache.cxf.transport.jms.JMSMessageHeadersType;
-import org.apache.cxf.transport.jms.JMSPropertyType;
 
 
 
@@ -41,57 +27,6 @@
             endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
             targetNamespace = "http://cxf.apache.org/hello_world_jms",
             wsdlLocation = "testutils/jms_test.wsdl")
-public class GreeterImplTwoWayJMS implements HelloWorldPortType {
-    @Resource
-    protected WebServiceContext wsContext;
-    public String greetMe(String me) {
-        MessageContext mc = wsContext.getMessageContext();
-        JMSMessageHeadersType headers =
-            (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_REQUEST_HEADERS);
-        System.out.println("get the message headers JMSCorrelationID" + headers.getJMSCorrelationID());
-        System.out.println("Reached here :" + me);
-        
-        // set reply header custom property
-        JMSPropertyType testProperty = new JMSPropertyType();
-        testProperty.setName("Test_Prop");
-        testProperty.setValue("some return value "  + me);
-        
-        System.out.println("found property in request headers at index: " 
-                           + headers.getProperty().indexOf(testProperty));
-        
-        JMSMessageHeadersType responseHeaders =
-            (JMSMessageHeadersType) mc.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS);
-        responseHeaders.getProperty().add(testProperty);
-        
-        return "Hello " + me;
-    }
-
-    public String sayHi() {        
-        return "Bonjour";
-    }
-    
-    public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);
-    }
-    
-    public TestRpcLitFaultResponse testRpcLitFault(String faultType) 
-        throws BadRecordLitFault, NoSuchCodeLitFault {
-        BadRecordLit badRecord = new BadRecordLit();
-        badRecord.setReason("BadRecordLitFault");
-        if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
-            throw new BadRecordLitFault("TestBadRecordLit", badRecord);
-        }
-        if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
-            ErrorCode ec = new ErrorCode();
-            ec.setMajor((short)1);
-            ec.setMinor((short)1);
-            NoSuchCodeLit nscl = new NoSuchCodeLit();
-            nscl.setCode(ec);
-            throw new NoSuchCodeLitFault("TestNoSuchCodeLit", nscl);
-        }
-        
-        return new TestRpcLitFaultResponse();
-    }
-    
+public class GreeterImplTwoWayJMS extends TwoWayJMSImplBase {    
     
 }

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Thu Jul 24 02:12:41 2008
@@ -128,6 +128,49 @@
     }
 
     @Test
+    public void docBasicJmsDestinationTest() throws Exception {
+        QName serviceName = getServiceName(new QName("http://apache.org/hello_world_doc_lit", 
+                                 "SOAPService6"));
+        QName portName = getPortName(new QName("http://apache.org/hello_world_doc_lit", "SoapPort6"));
+        URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
+        assertNotNull(wsdl);
+
+        SOAPService2 service = new SOAPService2(wsdl, serviceName);
+        assertNotNull(service);
+
+        String response1 = new String("Hello Milestone-");
+        String response2 = new String("Bonjour");
+        try {
+            Greeter greeter = service.getPort(portName, Greeter.class);
+            for (int idx = 0; idx < 5; idx++) {
+
+                greeter.greetMeOneWay("test String");
+                
+                String greeting = greeter.greetMe("Milestone-" + idx);
+                assertNotNull("no response received from service", greeting);
+                String exResponse = response1 + idx;
+                assertEquals(exResponse, greeting);
+
+
+                
+                String reply = greeter.sayHi();
+                assertNotNull("no response received from service", reply);
+                assertEquals(response2, reply);
+                
+                try {
+                    greeter.pingMe();
+                    fail("Should have thrown FaultException");
+                } catch (PingMeFault ex) {
+                    assertNotNull(ex.getFaultInfo());
+                }                
+              
+            }
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+    }
+
+    @Test
     public void testBasicConnection() throws Exception {
         QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
                                  "HelloWorldService"));
@@ -200,7 +243,7 @@
             throw (Exception)ex.getCause();
         }
     }
-    
+
     @Test
     public void testOneWayTopicConnection() throws Exception {
         QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
@@ -225,6 +268,30 @@
         }
     }
     
+    @Test
+    public void testJmsDestTopicConnection() throws Exception {
+        QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
+                                 "JmsDestinationPubSubService"));
+        QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", 
+                             "JmsDestinationPubSubPort"));
+        URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl");
+        assertNotNull(wsdl);
+
+        HelloWorldPubSubService service = new HelloWorldPubSubService(wsdl, serviceName);
+        assertNotNull(service);
+
+        try {
+            HelloWorldPubSubPort greeter = service.getPort(portName, HelloWorldPubSubPort.class);
+            for (int idx = 0; idx < 5; idx++) {
+                greeter.greetMeOneWay("JMS:PubSub:Milestone-" + idx);
+            }
+            //Give some time to complete one-way calls.
+            Thread.sleep(100L);
+        } catch (UndeclaredThrowableException ex) {
+            throw (Exception)ex.getCause();
+        }
+    }
+    
     @Test 
     public void testConnectionsWithinSpring() throws Exception {
         ClassPathXmlApplicationContext ctx = 

Modified: cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/Server.java?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/Server.java (original)
+++ cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/jms/Server.java Thu Jul 24 02:12:41 2008
@@ -31,12 +31,17 @@
         Object impl3  = new GreeterImplTopicOneWay();
         Object impleDoc = new GreeterImplDoc();
         Object impl4 = new GreeterByteMessageImpl();
+        Object impl5 =  new SoapService6SoapPort6Impl();
+        Object impl6 = new JmsDestPubSubImpl();
+        
         Endpoint.publish(null, impleDoc);
         String address = "http://localhost:9000/SoapContext/SoapPort";
         Endpoint.publish(address, implementor);
         Endpoint.publish("http://testaddr.not.required/", impl2);
         Endpoint.publish("http://testaddr.not.required.topic/", impl3);
         Endpoint.publish("http://testaddr.not.required.byte/", impl4);
+        Endpoint.publish("http://testaddr.not.required.jms/", impl5);
+        Endpoint.publish("http://ignore", impl6);
     }
 
 

Modified: cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl (original)
+++ cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/hello_world_doc_lit.wsdl Thu Jul 24 02:12:41 2008
@@ -227,6 +227,17 @@
             <soap:address location="http://localhost:9002/SOAPService5/SoapPort5"/>
         </wsdl:port>
     </wsdl:service>
+    <wsdl:service name="SOAPService6">
+        <wsdl:port name="SoapPort6" binding="tns:Greeter_SOAPBinding">
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory"
+                   jmsDestinationName="dynamicQueues/routertest.SOAPService6Q.text"
+                   jmsReplyDestinationName="dynamicQueues/SoapService6.reply.queue">
+                   <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+               </jms:address>
+        </wsdl:port>
+    </wsdl:service>
 
     <!-- XML Binding based Services-->
     <wsdl:service name="XMLService1">

Modified: cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jms_test.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jms_test.wsdl?rev=679316&r1=679315&r2=679316&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jms_test.wsdl (original)
+++ cxf/branches/2.0.x-fixes/testutils/src/main/resources/wsdl/jms_test.wsdl Thu Jul 24 02:12:41 2008
@@ -335,7 +335,7 @@
             <jms:server durableSubscriberName="CXF_subscriber"/>
         </port>
     </service>
-    
+        
     <service name="HelloWorldService">
            <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">
                <jms:address
@@ -378,6 +378,7 @@
             <jms:server durableSubscriberName="CXF_subscriber"/>
         </port>
     </service>
+
     <service name="HWByteMsgService">
         <port binding="tns:HelloWorldPortBinding" name="HWSByteMsgPort">
             <jms:address
@@ -432,7 +433,19 @@
             </jms:address>
         </port>
     </service>
-    
+
+    <service name="JmsDestinationPubSubService">
+        <port binding="tns:HelloWorldPubSubBinding" name="JmsDestinationPubSubPort">
+            <jms:address
+               destinationStyle="topic"
+               jndiConnectionFactoryName="ConnectionFactory" 
+               jmsDestinationName="dynamicTopics/test.jmstransport.oneway.topic.jmsdest">
+               <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+               <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+            </jms:address>
+        </port>
+    </service>
+        
     <service name="JMSSOAPServiceAddressing">
         <port binding="tns:HWJMSAddressingBinding" name="HWJMSAddressingPort">
             <jms:address