Return-Path: Delivered-To: apmail-synapse-commits-archive@minotaur.apache.org Received: (qmail 17481 invoked from network); 24 Sep 2009 02:10:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 02:10:58 -0000 Received: (qmail 65811 invoked by uid 500); 24 Sep 2009 02:10:58 -0000 Delivered-To: apmail-synapse-commits-archive@synapse.apache.org Received: (qmail 65735 invoked by uid 500); 24 Sep 2009 02:10:58 -0000 Mailing-List: contact commits-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list commits@synapse.apache.org Received: (qmail 65722 invoked by uid 99); 24 Sep 2009 02:10:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 02:10:58 +0000 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 02:10:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C086B238889C; Thu, 24 Sep 2009 02:10:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r818345 - in /synapse/trunk/java: repository/conf/sample/synapse_sample_264.xml src/site/xdoc/Synapse_Samples.xml Date: Thu, 24 Sep 2009 02:10:26 -0000 To: commits@synapse.apache.org From: ruwan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090924021026.C086B238889C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ruwan Date: Thu Sep 24 02:10:26 2009 New Revision: 818345 URL: http://svn.apache.org/viewvc?rev=818345&view=rev Log: Commiting for Supun, two-way JMS sample (SYNAPSE-582) Added: synapse/trunk/java/repository/conf/sample/synapse_sample_264.xml Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Added: synapse/trunk/java/repository/conf/sample/synapse_sample_264.xml URL: http://svn.apache.org/viewvc/synapse/trunk/java/repository/conf/sample/synapse_sample_264.xml?rev=818345&view=auto ============================================================================== --- synapse/trunk/java/repository/conf/sample/synapse_sample_264.xml (added) +++ synapse/trunk/java/repository/conf/sample/synapse_sample_264.xml Thu Sep 24 02:10:26 2009 @@ -0,0 +1,37 @@ + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file Modified: synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml URL: http://svn.apache.org/viewvc/synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml?rev=818345&r1=818344&r2=818345&view=diff ============================================================================== --- synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml (original) +++ synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Thu Sep 24 02:10:26 2009 @@ -220,7 +220,10 @@
  • Sample 262: CBR of FIX messages
  • -Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM)
  • +Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM) +
  • +Sample 264: Transport switching - HTTP/S to JMS two way messages
  • +
  • Introduction to Synapse tasks
      @@ -2755,8 +2758,8 @@

      Synapse will forward the order requests with symbol 'MSFT' to FIX endpoint FIX-4.1 @ localhost:19877.

      Synapse will not forward the orders with other symbols to any endpoint. (default case has kept blank in the configuration)

      To get an idea about the various transport parameters being used in this sample see -FIX Transport Parameters .

      - +FIX Transport Parameters .

      +

      Sample 263: Transport switching - JMS to http/s using JBoss Messaging(JBM)

      <definitions xmlns="http://ws.apache.org/ns/synapse">
      @@ -2826,9 +2829,53 @@
       

      e.g.

      <parameter name="transport.jms.Destination">dynamicTopics/something.TestTopic</parameter>
      +

      + Sample 264: Sending Two-Way Messages Using JMS transport +

      +
      <definitions xmlns="http://ws.apache.org/ns/synapse">    
      +    <proxy name="StockQuoteProxy" transports="http">
      +        <target>        
      +            <endpoint>
      +		            <address uri="jms:/SimpleStockQuoteService?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&
      +                  java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
      +            </endpoint>            
      +            <inSequence>                            
      +                <property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2"/>
      +            </inSequence>
      +            <outSequence>
      +                <property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>
      +                <send/>
      +            </outSequence>        
      +        <target> 
      +        <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>        
      +    </proxy>
      +</definitions>
      +

      + Objective: Demonstrate sending request response scenario with JMS transport +

      +

      + Prerequisites: +

      You need to set up synpase and axis2 server to use the JMS transport. See + Sample 251 for more details. +

      +

      + This sample is similar to the Sample 251. Only difference is we are expecting a response from the server. JMS transport uses transport.jms.ContentTypeProperty to + determine the content type of the response message. If this property is not set JMS transport treats the incoming message as plain text. +

      +

      + In the out path we remove the message context property TRANSPORT_HEADERS. If these property is not removed JMS headers will be passed to the client. +

      +

      Start Synpase using sample 264.

      +
      synapse.bat/synapse.sh -sample 264
      +

      Start Axis2 server with SimpleStockService deployed

      +

      Invoke the stockquote client using the following command.

      +
      ant stockquote -Daddurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=MSFT
      +

      The sample Axis2 server console will print a message indicating that it has received the request:

      +
      Generating quote for : MSFT
      +

      In the client side it shoud print a message indicating it has received the price.

      +
       Standard :: Stock price = $154.31851804993238
      - -

      +

      Introduction to Synapse Tasks

      Sample 300: Introduction to Tasks with simple trigger