You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ch...@apache.org on 2006/05/17 19:40:00 UTC

svn commit: r407337 - in /webservices/sandesha/trunk: samples/src/sandesha2/samples/userguide/ xdocs/

Author: chamikara
Date: Wed May 17 10:40:00 2006
New Revision: 407337

URL: http://svn.apache.org/viewvc?rev=407337&view=rev
Log:
Updated client code and documentation

Modified:
    webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoBlockingClient.java
    webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoClient.java
    webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/SyncPingClient.java
    webservices/sandesha/trunk/xdocs/download.html

Modified: webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoBlockingClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoBlockingClient.java?rev=407337&r1=407336&r2=407337&view=diff
==============================================================================
--- webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoBlockingClient.java (original)
+++ webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoBlockingClient.java Wed May 17 10:40:00 2006
@@ -16,15 +16,23 @@
 
 package sandesha2.samples.userguide;
 
+import java.io.ByteArrayInputStream;
 import java.io.File;
 
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
 
 import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -114,7 +122,7 @@
 		
 		serviceClient.setOptions(clientOptions);
 
-		clientOptions.setTimeOutInMilliSeconds(10000);
+		clientOptions.setTimeOutInMilliSeconds(40000);
 		
 		OMElement result = serviceClient.sendReceive (getEchoOMBlock("echo1",sequenceKey));
 		showResult(result);
@@ -129,7 +137,9 @@
 		showResult(result);
 		
 		clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
-		result = serviceClient.sendReceive(getEchoOMBlock("echo5",sequenceKey));
+		OMElement bodyElem = getEchoOMBlock("echo5",sequenceKey);
+		
+		result = serviceClient.sendReceive(bodyElem);
 		showResult(result);
 		        
         Thread.sleep(4000);
@@ -147,6 +157,11 @@
 		echoStringElement.addChild(textElem);
 		echoStringElement.addChild(sequenceElem);
 		
+		OMNamespace namespace = fac.createOMNamespace(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,"env");
+		OMAttribute attr = fac.createOMAttribute("encodingStyle", namespace,"http://schemas.xmlsoap.org/soap/encoding/");
+		
+		echoStringElement.addAttribute(attr);
+		
 		return echoStringElement;
 	}
 
@@ -160,7 +175,5 @@
 		
 		String resultStr = echoStringReturnElem.getText();
 		System.out.println("Got result:" + resultStr);
-    }
-
-	
+    }	
 }

Modified: webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoClient.java?rev=407337&r1=407336&r2=407337&view=diff
==============================================================================
--- webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoClient.java (original)
+++ webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/AsyncEchoClient.java Wed May 17 10:40:00 2006
@@ -94,10 +94,11 @@
 		
 		clientOptions.setTo(new EndpointReference (toEPR));
 		
+		
 		String acksTo = serviceClient.getMyEPR(Constants.TRANSPORT_HTTP).getAddress() + "/" + ServiceClient.ANON_OUT_IN_OP;
 		clientOptions.setProperty(SandeshaClientConstants.AcksTo,acksTo);
 		
-		String sequenceKey = "sequence4";
+		String sequenceKey = SandeshaUtil.getUUID();  //sequence key for thie sequence.
 		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
 		
 		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
@@ -106,7 +107,7 @@
 		
 		clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);   //uncomment this to send messages in SOAP 1.2
 		
-//		clientOptions.setProperty(SandeshaClient.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
+//		clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
 		
 		clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
 		clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,SandeshaUtil.getUUID());  //Uncomment this to offer a sequenceID for the incoming sequence.
@@ -114,6 +115,9 @@
 		
 		//You must set the following two properties in the request-reply case.
 		clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+		
+
+		
 		clientOptions.setUseSeparateListener(true);
 		
 		serviceClient.setOptions(clientOptions);
@@ -157,9 +161,13 @@
 		return echoStringElement;
 	}
 
-	class TestCallback extends Callback {
+	public class TestCallback extends Callback {
 
 		String name = null;
+		
+		public TestCallback () {
+			
+		}
 		
 		public TestCallback (String name) {
 			this.name = name;

Modified: webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/SyncPingClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/SyncPingClient.java?rev=407337&r1=407336&r2=407337&view=diff
==============================================================================
--- webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/SyncPingClient.java (original)
+++ webservices/sandesha/trunk/samples/src/sandesha2/samples/userguide/SyncPingClient.java Wed May 17 10:40:00 2006
@@ -18,8 +18,6 @@
 
 import java.io.File;
 
-import javax.xml.namespace.QName;
-
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -36,6 +34,7 @@
 import org.apache.sandesha2.client.SandeshaClientConstants;
 import org.apache.sandesha2.client.SandeshaListener;
 import org.apache.sandesha2.client.SequenceReport;
+import org.apache.sandesha2.util.SandeshaUtil;
 
 
 public class SyncPingClient {
@@ -86,7 +85,7 @@
 		clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportToEPR);
 		clientOptions.setTo(new EndpointReference (toEPR));
 		
-		String sequenceKey = "sequence1";
+		String sequenceKey = SandeshaUtil.getUUID();// "sequence2";
 		clientOptions.setProperty(SandeshaClientConstants.SEQUENCE_KEY,sequenceKey);
 	    
 //		clientOptions.setProperty(MessageContextConstants.CHUNKED,Constants.VALUE_FALSE);   //uncomment this to send messages without chunking.
@@ -112,7 +111,7 @@
 		serviceClient.fireAndForget(getPingOMBlock("ping3"));
 		
 		SequenceReport sequenceReport = null;
-		
+			
 		boolean complete = false;
 		while (!complete) {
 			sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);

Modified: webservices/sandesha/trunk/xdocs/download.html
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/xdocs/download.html?rev=407337&r1=407336&r2=407337&view=diff
==============================================================================
--- webservices/sandesha/trunk/xdocs/download.html (original)
+++ webservices/sandesha/trunk/xdocs/download.html Wed May 17 10:40:00 2006
@@ -13,51 +13,46 @@
 </div>
 
 <div align="center">
-<table class="bodyTable">
-    <tbody>
+<table class="bodyTable"><tbody>
         <tr class="a">
             <td width="45" align="center">Name</td>
             <td width="80" align="center">Type</td>
             <td width="300" align="center">Distribution</td>
             <td width="100" align="center">Date</td>
             <td width="200" align="center">Description</td>
+            <td width="200" align="center">Compatible Axis2 version</td>
         </tr>
-	  <tr class="c">
-            <td align="center" valign="middle"><a name="10"></a>1.0</td>
-            <td align="center">Release</td>
-            <td>
+	  <tr class="c"><td align="center" valign="middle"><a name="10"></a>1.0</td><td align="center">Release</td><td>
               Source Distribution 
-              <a href="[preferred]/ws/sandesha2/1_0/Sandesha2-1.0-src.zip" title="[preferred]/ws/sandesha2/1_0/Sandesha2-1.0-src.zip">zip</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-src.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-src.zip.md5">MD5</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-src.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-src.zip.asc">PGP</a>
+              <a href="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-src.zip" title="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-src.zip">zip</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.md5">MD5</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-src.zip.asc">PGP</a>
               <br></br>
               Binary Distribution
-              <a href="[preferred]/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip" title="[preferred]/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip">zip</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip.md5">MD5</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/Sandesha2-1.0-bin.zip.asc">PGP</a>
+              <a href="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-bin.zip" title="[preferred]/ws/sandesha2/1_0/sandesha2-1.0-bin.zip">zip</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.md5">MD5</a>
+              <a href="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/1_0/sandesha2-1.0-bin.zip.asc">PGP</a>
               <br></br>        
-            </td><td>05 - 08  - 2006</td>
+            </td><td>05 - 08 - 2006</td>
             <td>1.0 Release (Mirrored)</td>
-        </tr>
-	  <tr class="b">
-            <td align="center" valign="middle"><a name="09"></a>0.9</td>
-            <td align="center">Release</td>
-            <td>
+            <td>1.0</td>
+            </tr>
+	  <tr class="b"><td align="center" valign="middle"><a name="09"></a>0.9</td><td align="center">Release</td><td>
               Source Distribution 
-              <a href="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-src.zip" title="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-src.zip">zip</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5">MD5</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc">PGP</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip">zip</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.md5">MD5</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-src.zip.asc">PGP</a>
               <br></br>
               Binary Distribution
-              <a href="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip" title="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip">zip</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5">MD5</a>
-              <a href="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc" class="externalLink" title="http://www.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc">PGP</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip" title="[preferred]/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip">zip</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.md5">MD5</a>
+              <a href="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc" class="externalLink" title="http://archive.apache.org/dist/ws/sandesha2/0_9/Sandesha2-0.9-bin.zip.asc">PGP</a>
               <br></br>        
-            </td><td>12- 05  - 2005</td>
+            </td><td>12 - 05 - 2005</td>
             <td>0.9 Release (Mirrored)</td>
-        </tr>
-    </tbody>
-</table>
+            <td>0.93</td>
+     </tr>
+    </tbody></table>
 </div>
 <div align="left">
 <p>[if-any logo] <a href="[link]"><img align="right" src="[logo]" border="0" alt=""></img></a>[end] The currently selected mirror is <b>[preferred]</b>.  If



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org