Author: saminda
Date: Mon Mar 27 02:30:50 2006
New Revision: 389093

URL: http://svn.apache.org/viewcvs?rev=389093&view=rev
Log:
updated samples to cope with current changes

Modified:
    incubator/synapse/trunk/java/modules/core/conf/log4j.properties
    
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/DumbStockQuoteClient.java
    
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java
    
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/StockQuoteClient.java

Modified: incubator/synapse/trunk/java/modules/core/conf/log4j.properties
URL: 
http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/modules/core/conf/log4j.properties?rev=389093&r1=389092&r2=389093&view=diff
==============================================================================
--- incubator/synapse/trunk/java/modules/core/conf/log4j.properties (original)
+++ incubator/synapse/trunk/java/modules/core/conf/log4j.properties Mon Mar 27 
02:30:50 2006
@@ -1,8 +1,8 @@
 log4j.rootCategory=ERROR,logfile,stdout
 
 # Set the level to DEBUG if you want to log all SlideExceptions (some of them 
aren't errors)
-#log4j.category.org.apache.axis2=INFO
-#log4j.category.org.apache.synapse=DEBUG
+log4j.category.org.apache.axis2=INFO
+log4j.category.org.apache.synapse=DEBUG
 
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender

Modified: 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/DumbStockQuoteClient.java
URL: 
http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/modules/samples/src/samples/userguide/DumbStockQuoteClient.java?rev=389093&r1=389092&r2=389093&view=diff
==============================================================================
--- 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/DumbStockQuoteClient.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/DumbStockQuoteClient.java
 Mon Mar 27 02:30:50 2006
@@ -66,16 +66,7 @@
             options.setTo(targetEPR);
 
             options.setAction("http://www.webserviceX.NET/GetQuote";);
-            // create a lightweight Axis Config with no addressing to
-            // demonstrate "dumb" SOAP
-
-            //ServiceClient serviceClient = StockQuoteXMLHandler
-            //         .createServiceClient();
-            // make the ServiceClient
-
-            options.setProperty(
-                    
Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
-                    Boolean.TRUE);
+                        
             serviceClient.setOptions(options);
 
             // step 3 - Blocking invocation

Modified: 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java
URL: 
http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java?rev=389093&r1=389092&r2=389093&view=diff
==============================================================================
--- 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/ProxyStockQuoteClient.java
 Mon Mar 27 02:30:50 2006
@@ -65,10 +65,8 @@
         try {
             ServiceClient serviceClient;
             if (repository) {
-                ConfigurationContextFactory fac =
-                        new ConfigurationContextFactory();
                 ConfigurationContext configContext =
-                        
fac.createConfigurationContextFromFileSystem(args[3],null);
+                        
ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[3],null);
                 serviceClient = new ServiceClient(configContext, null);
             } else {
                 serviceClient = new ServiceClient();
@@ -103,13 +101,7 @@
             options.setProperty(HTTPConstants.PROXY, proxyProperties);
 
             options.setAction("http://www.webserviceX.NET/GetQuote";);
-            // create a lightweight Axis Config with no addressing to
-            // demonstrate "dumb" SOAP
-            options.setProperty(
-                    
Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
-                    new Boolean(true));
-
-
+            
             serviceClient.setOptions(options);
 
             // step 3 - Blocking invocation

Modified: 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/StockQuoteClient.java
URL: 
http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/modules/samples/src/samples/userguide/StockQuoteClient.java?rev=389093&r1=389092&r2=389093&view=diff
==============================================================================
--- 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/StockQuoteClient.java
 (original)
+++ 
incubator/synapse/trunk/java/modules/samples/src/samples/userguide/StockQuoteClient.java
 Mon Mar 27 02:30:50 2006
@@ -8,6 +8,8 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axiom.om.OMElement;
 
+import javax.xml.namespace.QName;
+
 
 public class StockQuoteClient {
 
@@ -66,12 +68,11 @@
             // step 1 - create a request payload
             OMElement getQuote = StockQuoteXMLHandler
                     .createRequestPayload(symb);
-            // step 2 - set up the call object
-            // the wsa:To
+
 
             ServiceClient serviceClient;
             if (repository) {
-                
+
                 ConfigurationContext configContext =
                         
ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[3],null);
                 serviceClient = new ServiceClient(configContext, null);
@@ -83,12 +84,16 @@
             EndpointReference targetEPR = new EndpointReference(xurl);
             options.setTo(targetEPR);
 
+            // step 2 - set up the call object
+            // the wsa:To
             options.setProperty(MessageContextConstants.TRANSPORT_URL, turl);
 
             options.setAction("http://www.webserviceX.NET/GetQuote";);
 
             //options.setSoapAction("http://www.webserviceX.NET/GetQuote";);
 
+            //Engage Addressing on  outgoing message.
+            serviceClient.engageModule(new QName("addressing"));
 
             serviceClient.setOptions(options);
             // step 3 - Blocking invocation



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to