Author: chamikara
Date: Tue Feb 21 19:57:23 2006
New Revision: 379671

URL: http://svn.apache.org/viewcvs?rev=379671&view=rev
Log:
Updated samples

Modified:
    
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncEchoClient.java
    
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncPingClient.java
    
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncEchoClient.java
    
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncPingClient.java
    
webservices/sandesha/trunk/samples/src/sandesha2/samples/simpleServer/SimpleSandesha2Server.java

Modified: 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncEchoClient.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncEchoClient.java?rev=379671&r1=379670&r2=379671&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncEchoClient.java
 (original)
+++ 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncEchoClient.java
 Tue Feb 21 19:57:23 2006
@@ -86,8 +86,7 @@
      
                ConfigurationContext configContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_CLIENT_PATH,axis2_xml);
 
-               ServiceClient serviceClient = new ServiceClient 
(configContext,null);
-               
+               ServiceClient serviceClient = new ServiceClient 
(configContext,null);   
                
                Options clientOptions = new Options ();
                
@@ -106,7 +105,7 @@
                
//clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);
                
//clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                String offeredSequenceID = SandeshaUtil.getUUID();
-               
//clientOptions.setProperty(Sandesha2ClientAPI.OFFERED_SEQUENCE_ID,offeredSequenceID);
  //Optional
+               
clientOptions.setProperty(Sandesha2ClientAPI.OFFERED_SEQUENCE_ID,offeredSequenceID);
  //Optional
                
                Callback callback1 = new TestCallback ("Callback 1");
                
serviceClient.sendReceiveNonblocking(getEchoOMBlock("echo1"),callback1);
@@ -119,8 +118,8 @@
                
serviceClient.sendReceiveNonblocking(getEchoOMBlock("echo4"),callback4);
                
                clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE, 
"true");
-               Callback callback5 = new TestCallback ("Callback 5");
-               
serviceClient.sendReceiveNonblocking(getEchoOMBlock("echo5"),callback5);
+               Callback callback5 = new TestCallback ("Callback 6");
+               
serviceClient.sendReceiveNonblocking(getEchoOMBlock("echo6"),callback5);
                
         while (!callback5.isComplete()) {
             Thread.sleep(1000);

Modified: 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncPingClient.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncPingClient.java?rev=379671&r1=379670&r2=379671&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncPingClient.java
 (original)
+++ 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/AsyncPingClient.java
 Tue Feb 21 19:57:23 2006
@@ -34,6 +34,7 @@
 import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
+import org.apache.ws.commons.soap.SOAP12Constants;
 import org.apache.sandesha2.client.Sandesha2ClientAPI;
 
 

Modified: 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncEchoClient.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncEchoClient.java?rev=379671&r1=379670&r2=379671&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncEchoClient.java
 (original)
+++ 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncEchoClient.java
 Tue Feb 21 19:57:23 2006
@@ -40,7 +40,6 @@
 import org.apache.sandesha2.client.Sandesha2ClientAPI;
 import org.apache.sandesha2.util.SandeshaUtil;
 
-import sandesha2.samples.interop.AsyncEchoClient.TestCallback;
 
 public class SyncEchoClient {
 

Modified: 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncPingClient.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncPingClient.java?rev=379671&r1=379670&r2=379671&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncPingClient.java
 (original)
+++ 
webservices/sandesha/trunk/samples/src/sandesha2/samples/interop/SyncPingClient.java
 Tue Feb 21 19:57:23 2006
@@ -32,6 +32,8 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContextConstants;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.ParameterImpl;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.ws.commons.om.OMAbstractFactory;
@@ -39,6 +41,7 @@
 import org.apache.ws.commons.om.OMFactory;
 import org.apache.ws.commons.om.OMNamespace;
 import org.apache.ws.commons.soap.SOAP11Constants;
+import org.apache.ws.commons.soap.SOAP12Constants;
 import org.apache.sandesha2.client.Sandesha2ClientAPI;
 
 
@@ -84,16 +87,19 @@
                
                Options clientOptions = new Options ();
                
clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
-       //      clientOptions.setr\
+
                clientOptions.setProperty(Options.COPY_PROPERTIES, new Boolean 
(true));
                clientOptions.setTo(new EndpointReference (toEPR));
                
clientOptions.setProperty(Sandesha2ClientAPI.SEQUENCE_KEY,"sequence1");
-       //      
clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);
-               
+           
//clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);
+               
//clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
                
                ServiceClient serviceClient = new ServiceClient 
(configContext,null);
                //serviceClient.
                
+               clientOptions.setProperty("prop1","test1234");
+               serviceClient.getAxisService().addParameter (new ParameterImpl  
("prop2","test12345"));
+               
                serviceClient.engageModule(new QName ("sandesha2"));
                serviceClient.setOptions(clientOptions);
                
@@ -101,7 +107,7 @@
                serviceClient.fireAndForget(getPingOMBlock("ping2"));
                
                clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE, 
"true");
-               serviceClient.fireAndForget(getPingOMBlock("ping3"));
+               serviceClient.fireAndForget(getPingOMBlock("ping31"));
                
        }
        

Modified: 
webservices/sandesha/trunk/samples/src/sandesha2/samples/simpleServer/SimpleSandesha2Server.java
URL: 
http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/src/sandesha2/samples/simpleServer/SimpleSandesha2Server.java?rev=379671&r1=379670&r2=379671&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/samples/src/sandesha2/samples/simpleServer/SimpleSandesha2Server.java
 (original)
+++ 
webservices/sandesha/trunk/samples/src/sandesha2/samples/simpleServer/SimpleSandesha2Server.java
 Tue Feb 21 19:57:23 2006
@@ -19,6 +19,8 @@
 import java.io.File;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
 
 public class SimpleSandesha2Server {
@@ -45,7 +47,9 @@
                System.out.println("Starting sandesha2 server...");
                
                String axis2_xml = AXIS2_SERVER_PATH + "axis2.xml";
-               SimpleHTTPServer server = new SimpleHTTPServer 
(AXIS2_SERVER_PATH,axis2_xml,8080);
+               ConfigurationContext configContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(AXIS2_SERVER_PATH,axis2_xml);
+               
+               SimpleHTTPServer server = new SimpleHTTPServer  
(configContext,8080);
                
                server.start();
        }



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

Reply via email to