You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2005/12/02 10:35:48 UTC

svn commit: r351648 - in /webservices/axis2/trunk/java/modules/samples/src: sample/amazon/search/ sample/google/search/ sample/mtom/imagetransfer/client/ sample/mtom/interop/client/ sample/security/ sample/sgccalculator/ sample/yahooservices/RESTSearch...

Author: chinthaka
Date: Fri Dec  2 01:35:21 2005
New Revision: 351648

URL: http://svn.apache.org/viewcvs?rev=351648&view=rev
Log:
removed the setTransportInfo() from the samples.

Modified:
    webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java
    webservices/axis2/trunk/java/modules/samples/src/sample/google/search/AsynchronousClient.java
    webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java
    webservices/axis2/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java
    webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java
    webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
    webservices/axis2/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/RESTClient.java
    webservices/axis2/trunk/java/modules/samples/src/userguide/clients/TCPClient.java

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/search/AsynchronousClient.java Fri Dec  2 01:35:21 2005
@@ -159,9 +159,8 @@
                 new EndpointReference(url.toString()));
         MessageContext requestContext = ClientUtil.getMessageContext();
         try {
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
 
             requestContext.getEnvelope().serializeAndConsume(
                     XMLOutputFactory.newInstance()

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/google/search/AsynchronousClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/google/search/AsynchronousClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/google/search/AsynchronousClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/google/search/AsynchronousClient.java Fri Dec  2 01:35:21 2005
@@ -99,9 +99,8 @@
 
         MessageContext requestContext = ClientUtil.getMessageContext(this);
         try {
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
             QName opName = new QName("urn:GoogleSearch", "doGoogleSearch");
             AxisOperation opdesc = new OutInAxisOperation(opName);
             //   AxisOperation opdesc = new AxisOperation(new QName("viewVersion"));

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/mtom/imagetransfer/client/MTOMClientModel.java Fri Dec  2 01:35:21 2005
@@ -89,8 +89,8 @@
         options.setTo(targetEPR);
         // enabling MTOM in the client side
         options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
-        options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                Constants.TRANSPORT_HTTP, false);
+        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+        options.setUseSeparateListener(false);
 
         call.setClientOptions(options);
         return call.invokeBlocking(operationName

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/mtom/interop/client/InteropClientModel.java Fri Dec  2 01:35:21 2005
@@ -51,7 +51,7 @@
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespace omNs = fac.createOMNamespace("http://example.org/mtom/data", "x");
         OMElement data = fac.createOMElement("Data", omNs);
-        
+
         File dataFile = new File(fileName);
         FileDataSource dataSource = new FileDataSource(dataFile);
         expectedDH = new DataHandler(dataSource);
@@ -70,8 +70,8 @@
         options.setTo(targetEPR);
         // enabling MTOM in the client side
         options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
-        options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                Constants.TRANSPORT_HTTP, false);
+        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+        options.setUseSeparateListener(false);
         call.setClientOptions(options);
 
         return call.invokeBlocking(operationName

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java Fri Dec  2 01:35:21 2005
@@ -47,8 +47,8 @@
             Options options = new Options();
             call.setClientOptions(options);
             options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP, false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
             options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
 
             //Blocking invocation

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/sgccalculator/CalcClient.java Fri Dec  2 01:35:21 2005
@@ -38,181 +38,180 @@
 
 public class CalcClient {
 
-	final static String addService = "http://localhost:8080/axis2/services/AddService";
+    final static String addService = "http://localhost:8080/axis2/services/AddService";
 
-	final static String substractService = "http://localhost:8080/axis2/services/SubstractService";
+    final static String substractService = "http://localhost:8080/axis2/services/SubstractService";
 
-	final static String multiplyService = "http://localhost:8080/axis2/services/MultiplyService";
+    final static String multiplyService = "http://localhost:8080/axis2/services/MultiplyService";
 
-	public static void main(String[] args) throws AxisFault,IOException {
+    public static void main(String[] args) throws AxisFault, IOException {
 
-		System.out.println ("\nTHIS IS A SAMPLE APPLICATION TO DEMONSTRATE THE FUNCTIONALITY OF SERVICE GROUPS");
-		System.out.println ("===============================================================================");
-		Call call = new Call();
+        System.out.println("\nTHIS IS A SAMPLE APPLICATION TO DEMONSTRATE THE FUNCTIONALITY OF SERVICE GROUPS");
+        System.out.println("===============================================================================");
+        Call call = new Call();
         Options options = new Options();
-        options.setTransportInfo(Constants.TRANSPORT_HTTP,
-				Constants.TRANSPORT_HTTP, false);
-		call.setClientOptions(options);
-		
-		boolean exit = false;
-		String serviceGroupContextId = null;
-		while (!exit) {
-			BufferedReader reader = new BufferedReader (new InputStreamReader (System.in));
-
-			System.out.print ("\n\nNew round (n) /continue round (c).../exit (e)");
-			String option = reader.readLine();
-			if ("e".equalsIgnoreCase(option)){
-				System.out.println ("Exiting calculator...");
-				return;
-			}
-			
-			if (!"n".equalsIgnoreCase(option) && !"c".equalsIgnoreCase(option)){
-				System.out.println ("Error: Invalid option");
-				continue;
-			}
-			
-			System.out.print ("Please Select the service ( '+' / '-' / '*' )....");
-			String operation = reader.readLine();
-			if (!"+".equalsIgnoreCase(operation) && !"-".equalsIgnoreCase(operation) && !"*".equalsIgnoreCase(operation)){
-				System.out.println ("Error: Invalid option");
-				continue;
-			}
-			
-			if ("+".equals(operation))
-				options.setTo(new EndpointReference (addService));
-			else if ("-".equals(operation))
-				options.setTo(new EndpointReference (substractService));
-			else if ("*".equals(operation))
-				options.setTo(new EndpointReference (multiplyService));
-			
-			if ("n".equalsIgnoreCase(option)){
-				System.out.print ("Enter parameter 1...");
-				String param1Str = reader.readLine();
-				System.out.print ("Enter parameter 2...");
-				String param2Str = reader.readLine();
-				int param1 = Integer.parseInt(param1Str);
-				int param2 = Integer.parseInt(param2Str);
-				
-				String opStr = null;
-				if ("+".equals(operation)){
-					opStr = "add";
-				}else if ("-".equals(operation)){
-					opStr = "substract";
-				}else if ("*".equals(operation)){
-					opStr = "multiply";
-				}
-				System.out.println("Invoking..."); 
-				SOAPEnvelope result = call.invokeBlocking(opStr,getRequestEnvelope(opStr,param1,param2,
-						serviceGroupContextId));
-				printResult(result);
-				
-				if (serviceGroupContextId==null)
-					serviceGroupContextId = getServiceGroupContextId(result);
-				
-				
-			}else if ("c".equalsIgnoreCase(option)){
-				if (serviceGroupContextId==null)
-				{
-					System.out.println ("Error: First operation must be a New one. Please select 'n'");
-					continue;
-				}
-				
-				System.out.print ("Enter parameter...");
-				String paramStr = reader.readLine();
-				int param = Integer.parseInt(paramStr);
-				String opStr = null;
-				if ("+".equals(operation)){
-					opStr = "addPrevious";
-				}else if ("-".equals(operation)){
-					opStr = "substractPrevious";
-				}else if ("*".equals(operation)){
-					opStr = "multiplyPrevious";
-				}
-				
-				System.out.println("Invoking..."); 
-				SOAPEnvelope result = call.invokeBlocking(opStr,getPreviousRequestEnvelope(opStr,param,
-						serviceGroupContextId));
-				printResult(result);
-				
-			}
-			
-		}
-	}
-	
-	public static void printResult (SOAPEnvelope result) {
-		try {
-			XMLStreamWriter writer = XMLOutputFactory.newInstance()
-					.createXMLStreamWriter(System.out);
-			if (result != null){
-				OMElement resultOM = result.getBody().getFirstChildWithName(new QName ("result"));
-				System.out.println ("Result is:" + resultOM.getText());
-			}else
-				System.out.println("Result is null");
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		} catch (FactoryConfigurationError e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static SOAPEnvelope getRequestEnvelope(String operationName,
-			int param1, int param2, String groupContextId) {
-		SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-		SOAPEnvelope envelope = fac.getDefaultEnvelope();
-		OMNamespace namespace = fac.createOMNamespace(
-				"http://axis2/test/namespace1", "ns1");
-
-		OMElement params = fac.createOMElement(operationName, namespace);
-		OMElement param1OM = fac.createOMElement("param1", namespace);
-		OMElement param2OM = fac.createOMElement("param2", namespace);
-		param1OM.setText(Integer.toString(param1));
-		param2OM.setText(Integer.toString(param2));
-		params.addChild(param1OM);
-		params.addChild(param2OM);
-		envelope.getBody().setFirstChild(params);
-
-		if (groupContextId != null) {
-			OMNamespace axis2Namespace = fac.createOMNamespace(
-					Constants.AXIS2_NAMESPACE_URI,
-					Constants.AXIS2_NAMESPACE_PREFIX);
-			SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
-					.addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
-			soapHeaderBlock.setText(groupContextId);
-		}
-
-		return envelope;
-	}
-	
-	public static SOAPEnvelope getPreviousRequestEnvelope(String operationName,
-			int param, String groupContextId) {
-		SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-		SOAPEnvelope envelope = fac.getDefaultEnvelope();
-		OMNamespace namespace = fac.createOMNamespace(
-				"http://axis2/test/namespace1", "ns1");
-
-		OMElement params = fac.createOMElement(operationName, namespace);
-		OMElement paramOM = fac.createOMElement("param", namespace);
-		paramOM.setText(Integer.toString(param));
-		params.addChild(paramOM);
-		envelope.getBody().setFirstChild(params);
-
-		if (groupContextId != null) {
-			OMNamespace axis2Namespace = fac.createOMNamespace(
-					Constants.AXIS2_NAMESPACE_URI,
-					Constants.AXIS2_NAMESPACE_PREFIX);
-			SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
-					.addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
-			soapHeaderBlock.setText(groupContextId);
-		}		
-		
-		return envelope;
-	}
-	
-	public static String getServiceGroupContextId (SOAPEnvelope resultEnvelope) {
-		String serviceGroupContextId = resultEnvelope.getHeader()
-		.getFirstChildWithName(new QName("ReplyTo"))
-		.getFirstChildWithName(new QName("ReferenceParameters"))
-		.getFirstChildWithName(new QName("ServiceGroupId")).getText();
-		return serviceGroupContextId;
-	}
+        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+        options.setUseSeparateListener(false);
+        call.setClientOptions(options);
+
+        boolean exit = false;
+        String serviceGroupContextId = null;
+        while (!exit) {
+            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
+
+            System.out.print("\n\nNew round (n) /continue round (c).../exit (e)");
+            String option = reader.readLine();
+            if ("e".equalsIgnoreCase(option)) {
+                System.out.println("Exiting calculator...");
+                return;
+            }
+
+            if (!"n".equalsIgnoreCase(option) && !"c".equalsIgnoreCase(option)) {
+                System.out.println("Error: Invalid option");
+                continue;
+            }
+
+            System.out.print("Please Select the service ( '+' / '-' / '*' )....");
+            String operation = reader.readLine();
+            if (!"+".equalsIgnoreCase(operation) && !"-".equalsIgnoreCase(operation) && !"*".equalsIgnoreCase(operation)) {
+                System.out.println("Error: Invalid option");
+                continue;
+            }
+
+            if ("+".equals(operation))
+                options.setTo(new EndpointReference(addService));
+            else if ("-".equals(operation))
+                options.setTo(new EndpointReference(substractService));
+            else if ("*".equals(operation))
+                options.setTo(new EndpointReference(multiplyService));
+
+            if ("n".equalsIgnoreCase(option)) {
+                System.out.print("Enter parameter 1...");
+                String param1Str = reader.readLine();
+                System.out.print("Enter parameter 2...");
+                String param2Str = reader.readLine();
+                int param1 = Integer.parseInt(param1Str);
+                int param2 = Integer.parseInt(param2Str);
+
+                String opStr = null;
+                if ("+".equals(operation)) {
+                    opStr = "add";
+                } else if ("-".equals(operation)) {
+                    opStr = "substract";
+                } else if ("*".equals(operation)) {
+                    opStr = "multiply";
+                }
+                System.out.println("Invoking...");
+                SOAPEnvelope result = call.invokeBlocking(opStr, getRequestEnvelope(opStr, param1, param2,
+                        serviceGroupContextId));
+                printResult(result);
+
+                if (serviceGroupContextId == null)
+                    serviceGroupContextId = getServiceGroupContextId(result);
+
+
+            } else if ("c".equalsIgnoreCase(option)) {
+                if (serviceGroupContextId == null) {
+                    System.out.println("Error: First operation must be a New one. Please select 'n'");
+                    continue;
+                }
+
+                System.out.print("Enter parameter...");
+                String paramStr = reader.readLine();
+                int param = Integer.parseInt(paramStr);
+                String opStr = null;
+                if ("+".equals(operation)) {
+                    opStr = "addPrevious";
+                } else if ("-".equals(operation)) {
+                    opStr = "substractPrevious";
+                } else if ("*".equals(operation)) {
+                    opStr = "multiplyPrevious";
+                }
+
+                System.out.println("Invoking...");
+                SOAPEnvelope result = call.invokeBlocking(opStr, getPreviousRequestEnvelope(opStr, param,
+                        serviceGroupContextId));
+                printResult(result);
+
+            }
+
+        }
+    }
+
+    public static void printResult(SOAPEnvelope result) {
+        try {
+            XMLStreamWriter writer = XMLOutputFactory.newInstance()
+                    .createXMLStreamWriter(System.out);
+            if (result != null) {
+                OMElement resultOM = result.getBody().getFirstChildWithName(new QName("result"));
+                System.out.println("Result is:" + resultOM.getText());
+            } else
+                System.out.println("Result is null");
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        } catch (FactoryConfigurationError e) {
+            e.printStackTrace();
+        }
+    }
+
+    public static SOAPEnvelope getRequestEnvelope(String operationName,
+                                                  int param1, int param2, String groupContextId) {
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+        SOAPEnvelope envelope = fac.getDefaultEnvelope();
+        OMNamespace namespace = fac.createOMNamespace(
+                "http://axis2/test/namespace1", "ns1");
+
+        OMElement params = fac.createOMElement(operationName, namespace);
+        OMElement param1OM = fac.createOMElement("param1", namespace);
+        OMElement param2OM = fac.createOMElement("param2", namespace);
+        param1OM.setText(Integer.toString(param1));
+        param2OM.setText(Integer.toString(param2));
+        params.addChild(param1OM);
+        params.addChild(param2OM);
+        envelope.getBody().setFirstChild(params);
+
+        if (groupContextId != null) {
+            OMNamespace axis2Namespace = fac.createOMNamespace(
+                    Constants.AXIS2_NAMESPACE_URI,
+                    Constants.AXIS2_NAMESPACE_PREFIX);
+            SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
+                    .addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
+            soapHeaderBlock.setText(groupContextId);
+        }
+
+        return envelope;
+    }
+
+    public static SOAPEnvelope getPreviousRequestEnvelope(String operationName,
+                                                          int param, String groupContextId) {
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+        SOAPEnvelope envelope = fac.getDefaultEnvelope();
+        OMNamespace namespace = fac.createOMNamespace(
+                "http://axis2/test/namespace1", "ns1");
+
+        OMElement params = fac.createOMElement(operationName, namespace);
+        OMElement paramOM = fac.createOMElement("param", namespace);
+        paramOM.setText(Integer.toString(param));
+        params.addChild(paramOM);
+        envelope.getBody().setFirstChild(params);
+
+        if (groupContextId != null) {
+            OMNamespace axis2Namespace = fac.createOMNamespace(
+                    Constants.AXIS2_NAMESPACE_URI,
+                    Constants.AXIS2_NAMESPACE_PREFIX);
+            SOAPHeaderBlock soapHeaderBlock = envelope.getHeader()
+                    .addHeaderBlock(Constants.SERVICE_GROUP_ID, axis2Namespace);
+            soapHeaderBlock.setText(groupContextId);
+        }
+
+        return envelope;
+    }
+
+    public static String getServiceGroupContextId(SOAPEnvelope resultEnvelope) {
+        String serviceGroupContextId = resultEnvelope.getHeader()
+                .getFirstChildWithName(new QName("ReplyTo"))
+                .getFirstChildWithName(new QName("ReferenceParameters"))
+                .getFirstChildWithName(new QName("ServiceGroupId")).getText();
+        return serviceGroupContextId;
+    }
 }

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/yahooservices/RESTSearch/RESTSearchClient.java Fri Dec  2 01:35:21 2005
@@ -16,7 +16,8 @@
             Options options = new Options();
             call.setClientOptions(options);
             options.setTo(new EndpointReference(epr));
-            options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
             options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
             options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);
 

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java Fri Dec  2 01:35:21 2005
@@ -37,9 +37,8 @@
             Options options = new Options();
             call.setClientOptions(options);
             options.setTo(targetEPR);
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
 
             //Blocking invocation
             OMElement result = call.invokeBlocking("echo",

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingClient.java Fri Dec  2 01:35:21 2005
@@ -43,9 +43,8 @@
             Options options = new Options();
             call.setClientOptions(options);
             options.setTo(targetEPR);
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
 
             //Blocking invocation
             OMElement result = call.invokeBlocking("echo",

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java Fri Dec  2 01:35:21 2005
@@ -46,9 +46,8 @@
             //The boolean flag informs the axis2 engine to use two separate transport connection
             //to retrieve the response.
             call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    true);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(true);
 
             //Blocking Invocation
             OMElement result = call.invokeBlocking("echo",

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingClient.java Fri Dec  2 01:35:21 2005
@@ -45,9 +45,8 @@
             Options options = new Options();
             call.setClientOptions(options);
             options.setTo(targetEPR);
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(false);
 
             //Callback to handle the response
             Callback callback = new Callback() {

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoNonBlockingDualClient.java Fri Dec  2 01:35:21 2005
@@ -44,9 +44,8 @@
 
             Options options = new Options();
             options.setTo(targetEPR);
-            options.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    true);
+            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+            options.setUseSeparateListener(true);
 
             Call call = new Call();
             call.setClientOptions(options);

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/RESTClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/RESTClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/RESTClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/RESTClient.java Fri Dec  2 01:35:21 2005
@@ -42,13 +42,14 @@
 
         Options options = new Options();
         options.setTo(new EndpointReference(toEpr));
-        options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+        options.setUseSeparateListener(false);
 
         options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
 
         Call call = new Call();
         call.setClientOptions(options);
-        
+
         OMElement result = call.invokeBlocking("echo", getPayload());
 
         try {

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/TCPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/TCPClient.java?rev=351648&r1=351647&r2=351648&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/TCPClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/TCPClient.java Fri Dec  2 01:35:21 2005
@@ -42,12 +42,10 @@
 
         Call call = new Call();
         Options options = new Options();
-            call.setClientOptions(options);
+        call.setClientOptions(options);
         options.setTo(new EndpointReference(toEpr));
-        options.setTransportInfo(Constants.TRANSPORT_TCP,
-                Constants.TRANSPORT_TCP,
-                false);
-        //call.engageModule(new QName(Constants.MODULE_ADDRESSING));
+        options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
+        options.setUseSeparateListener(false);
 
         OMElement result = call.invokeBlocking("echo", getPayload());