Author: veithen
Date: Sun Nov  9 09:09:33 2008
New Revision: 712519

URL: http://svn.apache.org/viewvc?rev=712519&view=rev
Log:
Documentation: updated samples to changes in SYNAPSE-424 + some formatting 
changes

Modified:
    synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml

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=712519&r1=712518&r2=712519&view=diff
==============================================================================
--- synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml (original)
+++ synapse/trunk/java/src/site/xdoc/Synapse_Samples.xml Sun Nov  9 09:09:33 
2008
@@ -2203,7 +2203,7 @@
 <pre xml:space="preserve">samples.services.SimpleStockQuoteService :: Accepted 
order for : 1000 stocks of ACP at $ 12.33</pre>
 <p></p>
 <p>The next section of this example demonstrates how a pure binary JMS message 
could be received and processed through Synapse. The configuration creates a 
proxy service named 'JMSFileUploadProxy' that accepts binary messages and wraps 
them into a custom element '{http://services.samples/xsd}element'. The received 
message is then forwarded to the MTOMSwASampleService using the SOAP action 
'urn:oneWayUploadUsingMTOM' and optimizing binary content using MTOM. To 
execute this sample, use the JMS client to publish a pure binary JMS message 
containing the file 
'./../../repository/conf/sample/resources/mtom/asf-logo.gif' to the JMS 
destination 'dynamicQueues/JMSFileUploadProxy' as follows: </p>
-<pre xml:space="preserve">ant jmsclient -Djms_type=binary 
-Djms_dest=dynamicQueues/JMSFileUploadProxy
+<pre xml:space="preserve">ant jmsclient -Djms_type=binary 
-Djms_dest=dynamicQueues/JMSFileUploadProxy \
               
-Djms_payload=./../../repository/conf/sample/resources/mtom/asf-logo.gif</pre>
 <p>Examining the Synapse debug logs reveals that the binary content was 
received over JMS and wrapped with the specified element into a SOAP infoset as 
follows: </p>
 <pre xml:space="preserve"><![CDATA[[jms-Worker-1] INFO LogMediator To: ,
@@ -2269,7 +2269,11 @@
 <p>Start the Synapse configuration numbered 253: i.e. synapse -sample 253 </p>
 <p></p>
 <p>This example invokes the one-way 'placeOrder' operation on the 
SimpleStockQuoteService using the Axis2 ServiceClient.fireAndForget() API at 
the client. To test this, use 'ant -Dmode=placeorder...' and you will notice 
the one-way JMS message flowing through Synapse into the sample Axis2 server 
instance over HTTP, and Axis2 acknowledging it with a HTTP 202 Accepted 
response. </p>
-<pre xml:space="preserve">ant stockquote -Dmode=placeorder 
-Dtrpurl=&quot;jms:/JMStoHTTPStockQuoteProxy?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61616&quot;</pre>
+<pre xml:space="preserve">ant stockquote -Dmode=placeorder 
-Dtrpurl=&quot;jms:/JMStoHTTPStockQuoteProxy?\
+transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory\
+&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory\
+&amp;java.naming.provider.url=tcp://localhost:61616\
+&amp;transport.jms.ContentTypeProperty=Content-Type&quot;</pre>
 <pre xml:space="preserve">SimpleStockQuoteService :: Accepted order for : 7482 
stocks of IBM at $ 169.27205579038733</pre>
 <p>The second example shows how Synapse could be made to respond with a HTTP 
202 Accepted response to a request received. The proxy service simply logs the 
message received and acknowledges it. On the Synapse console you could see the 
logged message, and if TCPMon was used at the client, you would see the 202 
Accepted response sent back to the client from Synapse </p>
 <pre xml:space="preserve">ant stockquote -Dmode=placeorder 
-Dtrpurl=http://localhost:8280/services/OneWayProxy</pre>


Reply via email to