You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2005/11/30 09:26:03 UTC

svn commit: r349908 [3/3] - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/ codegen/test/org/apache/axis2/rpc/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/eng...

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java Wed Nov 30 00:23:02 2005
@@ -22,6 +22,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.client.InOutMEPClient;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
@@ -84,8 +85,10 @@
 
             msgctx.setEnvelope(envelope);
 
-            inOutMC.setTo(targetEPR);
-            inOutMC.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+            Options options = new Options();
+            inOutMC.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
 
             MessageContext result =
                     inOutMC.invokeBlocking(
@@ -93,7 +96,7 @@
                             msgctx);
         } catch (Exception e) {
             e.printStackTrace();
-            fail("Exception Occurred !! ." + e.getMessage() );
+            fail("Exception Occurred !! ." + e.getMessage());
             throw new AxisFault(e);
         } finally {
             inOutMC.close();
@@ -106,7 +109,7 @@
         SOAPEnvelope envelope = fac.getDefaultEnvelope();
         OMNamespace headerNs = fac.createOMNamespace("http://dummyHeader", "dh");
         SOAPHeaderBlock h1 =
-            fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
+                fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
         h1.setMustUnderstand(true);
         h1.addChild(fac.createText("Dummy String"));
         h1.setRole(SOAP12Constants.SOAP_ROLE_NEXT);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java Wed Nov 30 00:23:02 2005
@@ -22,6 +22,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.description.AxisOperation;
@@ -86,6 +87,7 @@
         UtilServer.stop();
         UtilServer.unDeployClientService();
     }
+
     private void configureSystem(String opName) throws AxisFault {
         targetEPR =
                 new EndpointReference("http://127.0.0.1:"
@@ -112,24 +114,25 @@
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
         OMElement method = fac.createOMElement("echoString", omNs);
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
         SOAPEnvelope envelope = factory.getDefaultEnvelope();
         envelope.getBody().addChild(method);
 
         OMElement ref = fac.createOMElement("reference", null);
-        ref.addAttribute(fac.createOMAttribute("id",null,"1"));
+        ref.addAttribute(fac.createOMAttribute("id", null, "1"));
         ref.setText("hello Axis2");
         envelope.getBody().addChild(ref);
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                Constants.TRANSPORT_HTTP,
-                false);
-        SOAPEnvelope env = call.invokeBlocking("echoString",envelope);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+        SOAPEnvelope env = call.invokeBlocking("echoString", envelope);
         assertEquals(env.getBody().getFirstElement().getFirstElement().getText(), "hello Axis2");
     }
 
@@ -140,11 +143,11 @@
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
         OMElement method = fac.createOMElement("add", omNs);
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
 
         OMElement value2 = fac.createOMElement("arg1", null);
-        value2.addAttribute(fac.createOMAttribute("href",null,"#2"));
+        value2.addAttribute(fac.createOMAttribute("href", null, "#2"));
         method.addChild(value2);
 
         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
@@ -152,12 +155,12 @@
         envelope.getBody().addChild(method);
 
         OMElement ref = fac.createOMElement("reference", null);
-        ref.addAttribute(fac.createOMAttribute("id",null,"1"));
+        ref.addAttribute(fac.createOMAttribute("id", null, "1"));
         ref.setText("10");
         envelope.getBody().addChild(ref);
 
         OMElement ref2 = fac.createOMElement("reference", null);
-        ref2.addAttribute(fac.createOMAttribute("id",null,"2"));
+        ref2.addAttribute(fac.createOMAttribute("id", null, "2"));
         ref2.setText("10");
         envelope.getBody().addChild(ref2);
 
@@ -165,11 +168,13 @@
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("add",envelope);
+        SOAPEnvelope env = call.invokeBlocking("add", envelope);
         assertEquals(env.getBody().getFirstElement().getFirstElement().getText(), "20");
     }
 
@@ -180,11 +185,11 @@
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
         OMElement method = fac.createOMElement("add", omNs);
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
 
         OMElement value2 = fac.createOMElement("arg1", null);
-        value2.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value2.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value2);
 
         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
@@ -192,17 +197,20 @@
         envelope.getBody().addChild(method);
 
         OMElement ref = fac.createOMElement("reference", null);
-        ref.addAttribute(fac.createOMAttribute("id",null,"1"));
+        ref.addAttribute(fac.createOMAttribute("id", null, "1"));
         ref.setText("10");
         envelope.getBody().addChild(ref);
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("add",envelope);
+
+        SOAPEnvelope env = call.invokeBlocking("add", envelope);
         assertEquals(env.getBody().getFirstElement().getFirstElement().getText(), "20");
     }
 
@@ -214,11 +222,11 @@
             OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
             OMElement method = fac.createOMElement("add", omNs);
             OMElement value = fac.createOMElement("arg0", null);
-            value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+            value.addAttribute(fac.createOMAttribute("href", null, "#1"));
             method.addChild(value);
 
             OMElement value2 = fac.createOMElement("arg1", null);
-            value2.addAttribute(fac.createOMAttribute("href",null,"#2"));
+            value2.addAttribute(fac.createOMAttribute("href", null, "#2"));
             method.addChild(value2);
 
             SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
@@ -226,12 +234,12 @@
             envelope.getBody().addChild(method);
 
             OMElement ref = fac.createOMElement("reference", null);
-            ref.addAttribute(fac.createOMAttribute("id",null,"1"));
+            ref.addAttribute(fac.createOMAttribute("id", null, "1"));
             ref.setText("10");
             envelope.getBody().addChild(ref);
 
             OMElement ref2 = fac.createOMElement("reference", null);
-            ref2.addAttribute(fac.createOMAttribute("id",null,"3"));
+            ref2.addAttribute(fac.createOMAttribute("id", null, "3"));
             ref2.setText("10");
             envelope.getBody().addChild(ref2);
 
@@ -239,16 +247,18 @@
             RPCCall call =
                     new RPCCall("target/test-resources/intregrationRepo");
 
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
-            call.invokeBlocking("add",envelope);
+            call.invokeBlocking("add", envelope);
             fail("This should fail with : " + "org.apache.axis2.AxisFault: Invalid reference :2");
         } catch (AxisFault axisFault) {
             String val = axisFault.getMessage();
-            int index =  val.indexOf("org.apache.axis2.AxisFault: Invalid reference :2") ;
-            if(index <0){
+            int index = val.indexOf("org.apache.axis2.AxisFault: Invalid reference :2");
+            if (index < 0) {
                 fail("This should fail with : " + "org.apache.axis2.AxisFault: Invalid reference :2");
             }
         }
@@ -262,7 +272,7 @@
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
         OMElement method = fac.createOMElement("editBean", omNs);
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
         OMElement value2 = fac.createOMElement("arg1", null);
         value2.setText("159");
@@ -274,27 +284,29 @@
         envelope.getBody().addChild(method);
 
 
-        String ref1 ="<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1,fac);
+        String ref1 = "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
+        OMElement om1 = getOMelemnt(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2,fac);
+        OMElement om2 = getOMelemnt(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3,fac);
+        OMElement om3 = getOMelemnt(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4,fac);
+        OMElement om4 = getOMelemnt(ref4, fac);
         envelope.getBody().addChild(om4);
 
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("editBean",envelope);
+        SOAPEnvelope env = call.invokeBlocking("editBean", envelope);
         OMElement response = env.getBody().getFirstElement();
         MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
         assertNotNull(resBean);
@@ -310,7 +322,7 @@
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
         OMElement method = fac.createOMElement("beanOM", omNs);
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
         OMElement value2 = fac.createOMElement("arg1", null);
         value2.setText("159");
@@ -322,27 +334,30 @@
         envelope.getBody().addChild(method);
 
 
-        String ref1 ="<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1,fac);
+        String ref1 = "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
+        OMElement om1 = getOMelemnt(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2,fac);
+        OMElement om2 = getOMelemnt(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3,fac);
+        OMElement om3 = getOMelemnt(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4,fac);
+        OMElement om4 = getOMelemnt(ref4, fac);
         envelope.getBody().addChild(om4);
 
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("beanOM",envelope);
+
+        SOAPEnvelope env = call.invokeBlocking("beanOM", envelope);
         OMElement response = env.getBody().getFirstElement();
         MyBean resBean = (MyBean) BeanSerializerUtil.deserialize(MyBean.class, response.getFirstElement());
         assertNotNull(resBean);
@@ -359,11 +374,11 @@
         OMElement method = fac.createOMElement("omrefs", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
 
         OMElement value2 = fac.createOMElement("arg1", null);
-        value2.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value2.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value2);
 
 
@@ -372,45 +387,45 @@
         envelope.getBody().addChild(method);
 
 
-        String ref1 ="<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1,fac);
+        String ref1 = "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
+        OMElement om1 = getOMelemnt(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2,fac);
+        OMElement om2 = getOMelemnt(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3,fac);
+        OMElement om3 = getOMelemnt(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4,fac);
+        OMElement om4 = getOMelemnt(ref4, fac);
         envelope.getBody().addChild(om4);
 
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                Constants.TRANSPORT_HTTP,
-                false);
-        SOAPEnvelope env = call.invokeBlocking("omrefs",envelope);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+        SOAPEnvelope env = call.invokeBlocking("omrefs", envelope);
         OMElement response = env.getBody().getFirstElement();
 
         ArrayList args = new ArrayList();
         args.add(boolean.class);
 
-        Object [] resBean = BeanSerializerUtil.deserialize(response,args.toArray());
+        Object [] resBean = BeanSerializerUtil.deserialize(response, args.toArray());
         assertNotNull(resBean);
-        assertEquals(((Boolean)resBean[0]).booleanValue(),true);
+        assertEquals(((Boolean) resBean[0]).booleanValue(), true);
         call.close();
     }
 
-    private OMElement getOMelemnt(String str,OMFactory fac) throws AxisFault {
+    private OMElement getOMelemnt(String str, OMFactory fac) throws AxisFault {
         StAXOMBuilder staxOMBuilder;
         try {
-            XMLStreamReader xmlReader=  XMLInputFactory.newInstance().createXMLStreamReader(new
+            XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new
                     ByteArrayInputStream(str.getBytes()));
             staxOMBuilder = new
-                    StAXOMBuilder(fac,xmlReader);
+                    StAXOMBuilder(fac, xmlReader);
         } catch (XMLStreamException e) {
             throw new AxisFault(e);
         } catch (FactoryConfigurationError factoryConfigurationError) {
@@ -428,7 +443,7 @@
         OMElement method = fac.createOMElement("echoEmployee", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
 
 
@@ -437,25 +452,27 @@
         envelope.getBody().addChild(method);
 
 
-        String str= "<reference id=\"1\">\n" +
+        String str = "<reference id=\"1\">\n" +
                 " <name>John</name>\n" +
                 " <age>50</age>\n" +
                 " <emplyer href=\"#1\"/>\n" +
                 " <address href=\"#2\"/>\n" +
                 "</reference>";
-        envelope.getBody().addChild(getOMelemnt(str,fac));
-        str ="<reference id=\"2\">\n" +
+        envelope.getBody().addChild(getOMelemnt(str, fac));
+        str = "<reference id=\"2\">\n" +
                 "<town>Colombo3</town><number>1010</number>\n" +
                 "</reference>";
-        envelope.getBody().addChild(getOMelemnt(str,fac));
+        envelope.getBody().addChild(getOMelemnt(str, fac));
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("echoEmployee",envelope);
+        SOAPEnvelope env = call.invokeBlocking("echoEmployee", envelope);
         Employee emp = (Employee) BeanSerializerUtil.deserialize(Employee.class, env.getBody().getFirstElement().getFirstElement());
         assertNotNull(emp);
     }
@@ -469,7 +486,7 @@
         OMElement method = fac.createOMElement("handleArrayList", omNs);
 
         OMElement value = fac.createOMElement("arg0", null);
-        value.addAttribute(fac.createOMAttribute("href",null,"#1"));
+        value.addAttribute(fac.createOMAttribute("href", null, "#1"));
         method.addChild(value);
 
         OMElement value2 = fac.createOMElement("arg1", null);
@@ -482,33 +499,35 @@
         envelope.getBody().addChild(method);
 
 
-
-        String str= "<reference id=\"1\">\n" +
+        String str = "<reference id=\"1\">\n" +
                 "    <item0>abc</item0>\n" +
                 "    <item0>def</item0>\n" +
                 "    <item0>ghi</item0>\n" +
                 "    <item0>klm</item0>\n" +
                 "</reference>";
-        StAXOMBuilder staxOMBuilder ;
+        StAXOMBuilder staxOMBuilder;
         try {
-            XMLStreamReader xmlReader=  XMLInputFactory.newInstance().createXMLStreamReader(new
+            XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new
                     ByteArrayInputStream(str.getBytes()));
             staxOMBuilder = new
-                    StAXOMBuilder(fac,xmlReader);
+                    StAXOMBuilder(fac, xmlReader);
         } catch (XMLStreamException e) {
-            throw  new AxisFault(e);
+            throw new AxisFault(e);
         } catch (FactoryConfigurationError factoryConfigurationError) {
-            throw  new AxisFault(factoryConfigurationError);
+            throw new AxisFault(factoryConfigurationError);
         }
         envelope.getBody().addChild(staxOMBuilder.getDocumentElement());
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
-        SOAPEnvelope env = call.invokeBlocking("handleArrayList",envelope);
+
+        SOAPEnvelope env = call.invokeBlocking("handleArrayList", envelope);
         assertEquals(env.getBody().getFirstElement().getFirstElement().getText(), "abcdefghiklm10");
     }
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.description.AxisOperation;
@@ -96,13 +97,17 @@
 
     public void testEditBean() throws AxisFault {
         configureSystem("editBean");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
+        String clientHome = "target/test-resources/intregrationRepo";
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
+
+        RPCCall call = new RPCCall(clientHome);
+        call.setClientOptions(options);
+
         MyBean bean = new MyBean();
         bean.setAge(100);
         bean.setName("Deepal");
@@ -146,14 +151,17 @@
 
     public void testEchoBean() throws AxisFault {
         configureSystem("echoBean");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         MyBean bean = new MyBean();
         bean.setAge(100);
         bean.setName("Deepal");
@@ -178,14 +186,17 @@
 
     public void testEchoString() throws AxisFault {
         configureSystem("echoString");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("foo");
         OMElement response = call.invokeBlocking(operationName, args.toArray());
@@ -195,14 +206,17 @@
 
     public void testEchoInt() throws AxisFault {
         configureSystem("echoInt");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("100");
 
@@ -216,10 +230,12 @@
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
+        call.setClientOptions(options);
         ArrayList args = new ArrayList();
         args.add("100");
         args.add("200");
@@ -234,8 +250,10 @@
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
@@ -252,11 +270,13 @@
         RPCCall call =
                 new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        call.setClientOptions(options);
 
         ArrayList args = new ArrayList();
         args.add("true");
@@ -268,14 +288,18 @@
 
     public void testEchoByte() throws AxisFault {
         configureSystem("echoByte");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("1");
         OMElement response = call.invokeBlocking(operationName, args.toArray());
@@ -285,14 +309,17 @@
 
     public void testCompany() throws AxisFault {
         configureSystem("echoCompany");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         Company com = new Company();
         com.setName("MyCompany");
 
@@ -322,14 +349,17 @@
 
     public void testEchoOM() throws AxisFault {
         configureSystem("echoOM");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("1");
         OMElement response = call.invokeBlocking(operationName, args.toArray());
@@ -340,14 +370,17 @@
     public void testCalender() throws AxisFault {
         zulu.setTimeZone(TimeZone.getTimeZone("GMT"));
         configureSystem("echoCalander");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         Date date = Calendar.getInstance().getTime();
         args.add(zulu.format(date));
@@ -360,14 +393,17 @@
     ////////////////////////////////////////////////// Invoking by Passing Return types //////////
     public void testechoBean2() throws AxisFault {
         configureSystem("echoBean");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         MyBean bean = new MyBean();
         bean.setAge(100);
         bean.setName("Deepal");
@@ -392,14 +428,17 @@
 
     public void testechoInt2() throws AxisFault {
         configureSystem("echoInt");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("100");
 
@@ -413,14 +452,17 @@
 
     public void testmultireturn() throws AxisFault {
         configureSystem("multireturn");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("1");
 
@@ -437,14 +479,17 @@
 
     public void testmulReturn() throws AxisFault {
         configureSystem("mulReturn");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
 
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
+
         ArrayList args = new ArrayList();
         args.add("foo");
 
@@ -457,13 +502,16 @@
 
     public void testhandleArrayList() throws AxisFault {
         configureSystem("handleArrayList");
-        RPCCall call =
-                new RPCCall("target/test-resources/intregrationRepo");
 
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP,
                 false);
+
+        RPCCall call =
+                new RPCCall("target/test-resources/intregrationRepo");
+        call.setClientOptions(options);
 
         OMElement elem = call.invokeBlocking("handleArrayList", getpayLoad());
         assertEquals(elem.getFirstElement().getText(), "abcdefghiklm10");

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/InteropTestBase.java Wed Nov 30 00:23:02 2005
@@ -16,13 +16,12 @@
 
 package org.apache.axis2.security;
 
+import junit.framework.TestCase;
 import org.apache.axis2.Constants;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.security.handler.config.InflowConfiguration;
 import org.apache.axis2.security.handler.config.OutflowConfiguration;
 
-import junit.framework.TestCase;
-
 public abstract class InteropTestBase extends TestCase {
 
     protected static final String SCENARIO1_SERVICE_REPOSITORY = "scenario1_service_repo";
@@ -80,10 +79,9 @@
     protected static final String DEFAULT_CLIENT_REPOSITORY = "default_security_client_repo";
 
     private String targetEpr = "http://127.0.0.1:" +
-    		//5556 +
     		UtilServer.TESTING_PORT +
     		"/axis2/services/PingPort";
-    
+
 	public InteropTestBase() {
 		super();
 	}
@@ -131,7 +129,7 @@
     		e.printStackTrace();
     		fail("Error in introperating with " + targetEpr + ", client configuration: " + getClientRepo());
     	}
-    	
+
     }
     
     protected abstract OutflowConfiguration getOutflowConfiguration();

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.context.ConfigurationContext;
@@ -112,9 +113,11 @@
         org.apache.axis2.client.Call call = new org.apache.axis2.client.Call(
                 serviceContext);
 
-        call.setTo(targetEPR);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-        call.setTransportInfo(Constants.TRANSPORT_TCP,
+        options.setTransportInfo(Constants.TRANSPORT_TCP,
                 Constants.TRANSPORT_TCP,
                 false);
 
@@ -159,9 +162,11 @@
         org.apache.axis2.client.Call call = new org.apache.axis2.client.Call(
                 serviceContext);
 
-        call.setTo(targetEPR);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-        call.setTransportInfo(Constants.TRANSPORT_TCP,
+        options.setTransportInfo(Constants.TRANSPORT_TCP,
                 Constants.TRANSPORT_TCP,
                 false);
 
@@ -189,10 +194,12 @@
 
         org.apache.axis2.client.Call call = new org.apache.axis2.client.Call(
                 serviceContext);
-        call.setTo(targetEPR);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-        call.setWsaAction(operationName.getLocalPart());
-        call.setTransportInfo(Constants.TRANSPORT_TCP,
+        options.setAction(operationName.getLocalPart());
+        options.setTransportInfo(Constants.TRANSPORT_TCP,
                 Constants.TRANSPORT_TCP,
                 true);
 
@@ -210,10 +217,11 @@
 
         AxisOperation opdesc = new OutInAxisOperation(new QName("echoOMElement"));
         org.apache.axis2.client.Call call = new org.apache.axis2.client.Call(Constants.TESTING_REPOSITORY);
-        call.setTo(targetEPR);
-
-        call.setWsaAction(operationName.getLocalPart());
-        call.setTransportInfo(Constants.TRANSPORT_TCP, Constants.TRANSPORT_TCP, false);
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setAction(operationName.getLocalPart());
+        options.setTransportInfo(Constants.TRANSPORT_TCP, Constants.TRANSPORT_TCP, false);
 
         OMFactory fac = OMAbstractFactory.getOMFactory();
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPTwoChannelEchoRawXMLTest.java Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.context.MessageContext;
@@ -123,11 +124,13 @@
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
 
         try {
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_TCP,
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_TCP,
                     Constants.TRANSPORT_TCP,
                     true);
-            call.setWsaAction(operationName.getLocalPart());
+            options.setAction(operationName.getLocalPart());
             Callback callback = new Callback() {
                 public void onComplete(AsyncResult result) {
                     try {

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPConnectionImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPConnectionImpl.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPConnectionImpl.java (original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPConnectionImpl.java Wed Nov 30 00:23:02 2005
@@ -19,6 +19,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAttribute;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMNode;
@@ -55,12 +56,16 @@
 
             Call call = new Call();
             URL url = new URL(endpoint.toString());
-            call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+
+            Options options = new Options();
+            options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
-            call.setTo(
+            options.setTo(
                     new EndpointReference(url.toString()));
+            call.setClientOptions(options);
+
             String axisOp = request.getSOAPBody().getFirstChild().getNodeName();
             NodeImpl bodyContentNode = (NodeImpl)request.getSOAPBody().getFirstChild();
             OMElement bodyContent = (OMElement)bodyContentNode.getOMNode();

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableCreateQueue.java Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
 import sample.amazon.amazonSimpleQueueService.OMElementCreator;
@@ -71,11 +72,14 @@
         String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
         try {
             Call call = new Call();
-            call.setTo(new EndpointReference(url));
-            call.setSoapAction("http://soap.amazon.com");
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+
+            Options options = new Options();
+            options.setTo(new EndpointReference(url));
+            options.setSoapAction("http://soap.amazon.com");
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
+            call.setClientOptions(options);
             call.invokeNonBlocking(operation, element, specificCallbackObject);
         } catch (AxisFault axisFault) {
             axisFault.printStackTrace();

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableDeleteQueue.java Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
 import sample.amazon.amazonSimpleQueueService.OMElementCreator;
@@ -60,9 +61,12 @@
         String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
         try {
             Call call = new Call();
-            call.setSoapAction("http://soap.amazon.com");
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setSoapAction("http://soap.amazon.com");
+            options.setTo(new EndpointReference(url));
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
             call.invokeNonBlocking(operation, element, specificCallbackObject);

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableListMyQueues.java Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
 import sample.amazon.amazonSimpleQueueService.OMElementCreator;
@@ -60,11 +61,15 @@
         String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
         try {
             Call call = new Call();
-            call.setSoapAction("http://soap.amazon.com");
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setSoapAction("http://soap.amazon.com");
+            options.setTo(new EndpointReference(url));
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
+            
             call.invokeNonBlocking(operation, element, specificCallbackObject);
         } catch (AxisFault axisFault) {
             axisFault.printStackTrace();

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/amazon/amazonSimpleQueueService/util/RunnableReadQueue.java Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
 import sample.amazon.amazonSimpleQueueService.OMElementCreator;
@@ -57,12 +58,13 @@
         //endpoint uri is hard coded....
         String url = "http://webservices.amazon.com/onca/soap?Service=AWSSimpleQueueService";
         try {
+            Options options = new Options();
+            options.setSoapAction("http://soap.amazon.com");
+            options.setTo(new EndpointReference(url));
+            options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
             Call call = new Call();
-            call.setSoapAction("http://soap.amazon.com");
-            call.setTo(new EndpointReference(url));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                    Constants.TRANSPORT_HTTP,
-                    false);
+            call.setClientOptions(options);
             call.invokeNonBlocking(operation, element, specificCallbackObject);
         } catch (AxisFault axisFault) {
             axisFault.printStackTrace();

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.OutInAxisOperation;
@@ -151,11 +152,14 @@
         } catch (MalformedURLException e) {
             e.printStackTrace();
         }
-        call.setTo(
+
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(
                 new EndpointReference(url.toString()));
         MessageContext requestContext = ClientUtil.getMessageContext();
         try {
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
 

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.OutInAxisOperation;
@@ -84,19 +85,21 @@
         Call call = new Call();
         URL url = null;
         try {
-            url = new URL("http", "api.google.com","/search/beta2");
+            url = new URL("http", "api.google.com", "/search/beta2");
             //  url = new URL("http://127.0.0.1:8080/axis2/services/axisversion/viewVersion");
         } catch (MalformedURLException e) {
             e.printStackTrace();
             System.exit(0);
         }
 
-        call.setTo(
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(
                 new EndpointReference(url.toString()));
 
         MessageContext requestContext = ClientUtil.getMessageContext(this);
         try {
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
             QName opName = new QName("urn:GoogleSearch", "doGoogleSearch");

Modified: webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java Wed Nov 30 00:23:02 2005
@@ -3,6 +3,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMAbstractFactory;
@@ -80,8 +81,9 @@
             ;
         }
 
-        call.setTo(
-                new EndpointReference(url.toString()));
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(new EndpointReference(url.toString()));
         try {
             call.invokeNonBlocking("doGoogleSpellingSugg",
                     requestElement,
@@ -112,8 +114,9 @@
             observer.updateError(e.getMessage());
         }
 
-        call.setTo(
-                new EndpointReference(url.toString()));
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(new EndpointReference(url.toString()));
         try {
             responseElement =
                     call.invokeBlocking("doGoogleSpellingSugg",

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.attachments.utils.ImageDataSource;
 import org.apache.axis2.attachments.utils.ImageIO;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -82,12 +83,16 @@
         OMElement payload = createEnvelope(fileName);
 
         Call call = new Call();
-        call.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-        call.setTo(targetEPR);
+
+        Options options = new Options();
+        options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+        options.setTo(targetEPR);
         // enabling MTOM in the client side
-        call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP, false);
+
+        call.setClientOptions(options);
         return call.invokeBlocking(operationName
                 .getLocalPart(),
                 payload);

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -19,6 +19,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -63,12 +64,16 @@
 
         OMElement payload = createEnvelope(fileName);
         Call call = new Call();
-        call.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-        call.setTo(targetEPR);
+        Options options = new Options();
+
+        options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+        options.setTo(targetEPR);
         // enabling MTOM in the client side
-        call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_FALSE);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP, false);
+        call.setClientOptions(options);
+
         return call.invokeBlocking(operationName
                 .getLocalPart(),
                 payload);

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -31,43 +32,44 @@
 
 public class Client {
 
-	/**
-	 * @param args
-	 */
-	public static void main(String[] args) {
-		try {
-			
-			// Get the repository location from the args
-			String repo = args[0];
-			String port = args[1];
-			
-			OMElement payload = getEchoElement();
-			Call call = new Call(repo);
-			
-			call.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
-			call.setTransportInfo(Constants.TRANSPORT_HTTP,
-					Constants.TRANSPORT_HTTP, false);
-			call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+    /**
+     * @param args
+     */
+    public static void main(String[] args) {
+        try {
+
+            // Get the repository location from the args
+            String repo = args[0];
+            String port = args[1];
+
+            OMElement payload = getEchoElement();
+            Call call = new Call(repo);
+            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.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
 
-			//Blocking invocation
-			OMElement result = call.invokeBlocking("echo", payload);
+            //Blocking invocation
+            OMElement result = call.invokeBlocking("echo", payload);
 
-			StringWriter writer = new StringWriter();
-			result.serialize(XMLOutputFactory.newInstance()
+            StringWriter writer = new StringWriter();
+            result.serialize(XMLOutputFactory.newInstance()
                     .createXMLStreamWriter(writer));
-			writer.flush();
+            writer.flush();
 
-			System.out.println("Response: " + writer.toString());
+            System.out.println("Response: " + writer.toString());
 
-			System.out.println("SecureService Invocation successful :-)");
-		} catch (AxisFault axisFault) {
-			axisFault.printStackTrace();
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		}
-	}
+            System.out.println("SecureService Invocation successful :-)");
+        } catch (AxisFault axisFault) {
+            axisFault.printStackTrace();
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
 
-	private static OMElement getEchoElement() {
+    private static OMElement getEchoElement() {
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespace omNs = fac.createOMNamespace(
                 "http://example1.org/example1", "example1");
@@ -77,6 +79,6 @@
         method.addChild(value);
 
         return method;
-	}
+    }
 
 }

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -19,6 +19,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMNamespace;
@@ -48,9 +49,10 @@
 		System.out.println ("\nTHIS IS A SAMPLE APPLICATION TO DEMONSTRATE THE FUNCTIONALITY OF SERVICE GROUPS");
 		System.out.println ("===============================================================================");
 		Call call = new Call();
-		call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
 				Constants.TRANSPORT_HTTP, false);
-		
+		call.setClientOptions(options);
 		
 		boolean exit = false;
 		String serviceGroupContextId = null;
@@ -77,11 +79,11 @@
 			}
 			
 			if ("+".equals(operation))
-				call.setTo(new EndpointReference (addService));
+				options.setTo(new EndpointReference (addService));
 			else if ("-".equals(operation))
-				call.setTo(new EndpointReference (substractService));
+				options.setTo(new EndpointReference (substractService));
 			else if ("*".equals(operation))
-				call.setTo(new EndpointReference (multiplyService));
+				options.setTo(new EndpointReference (multiplyService));
 			
 			if ("n".equalsIgnoreCase(option)){
 				System.out.print ("Enter parameter 1...");

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -2,30 +2,32 @@
 
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.RESTCall;
 import org.apache.axis2.om.OMElement;
 
 public class RESTSearchClient {
     public static void main(String[] args) {
-        try{
+        try {
 
             String epr = "http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=ApacheRestDemo&query=finances&format=pdf";
 
             RESTCall call = new RESTCall();
-            call.setTo(new EndpointReference(epr));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP, false);
-            call.set(Constants.Configuration.ENABLE_REST,Constants.VALUE_TRUE);
-            call.set(Constants.Configuration.ENABLE_REST_THROUGH_GET,Constants.VALUE_TRUE);
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(new EndpointReference(epr));
+            options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+            options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+            options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);
 
             //if post is through GET of HTTP
             OMElement response = call.invokeBlocking();
             response.serialize(System.out);
 
-        }catch(Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
     }
-
 
 
 }

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMElement;
 
 import javax.xml.stream.XMLOutputFactory;
@@ -33,8 +34,10 @@
         try {
             OMElement payload = ClientUtil.getEchoOMElement();
             Call call = new Call();
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
 

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMElement;
 
 import javax.xml.stream.XMLOutputFactory;
@@ -38,8 +39,11 @@
         try {
             OMElement payload = ClientUtil.getEchoOMElement();
             Call call = new Call();
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
 

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMElement;
 
 import javax.xml.namespace.QName;
@@ -38,12 +39,14 @@
             OMElement payload = ClientUtil.getEchoOMElement();
 
             Call call = new Call();
-            call.setTo(targetEPR);
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
 
             //The boolean flag informs the axis2 engine to use two separate transport connection
             //to retrieve the response.
             call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     true);
 
@@ -56,7 +59,6 @@
                     .createXMLStreamWriter(writer));
             writer.flush();
             System.out.println(writer.toString());
-
 
             //Need to close the Client Side Listener.
             call.close();

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingWsaBasedClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingWsaBasedClient.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingWsaBasedClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/EchoBlockingWsaBasedClient.java Wed Nov 30 00:23:02 2005
@@ -18,6 +18,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -27,11 +28,12 @@
 
 /**
  * To run this sample you have to deploy WsaMappingService.aar to the
- * service folder. 
+ * service folder.
  */
 public class EchoBlockingWsaBasedClient {
 
     private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/WsaMappingTest");
+
     private static OMElement getBody() {
         OMFactory fac = OMAbstractFactory.getOMFactory();
         OMNamespace omNs = fac
@@ -44,12 +46,14 @@
     public static void main(String[] args) throws Exception {
 
         Call call = new Call();
-        call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+        Options options = new Options();
+        call.setClientOptions(options);
+        options.setTo(targetEPR);
+        options.setTransportInfo(Constants.TRANSPORT_HTTP,
                 Constants.TRANSPORT_HTTP, false);
 
         //Blocking invocation via wsa mapping
-        call.setWsaAction("urn:sample/echo");
+        options.setAction("urn:sample/echo");
         OMElement result = (OMElement) call.invokeBlocking("echo", getBody());
 
         StringWriter writer = new StringWriter();

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -21,6 +21,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
@@ -41,8 +42,10 @@
             OMElement payload = ClientUtil.getEchoOMElement();
 
             Call call = new Call();
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     false);
 

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -21,11 +21,11 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.om.OMElement;
 
-import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import java.io.StringWriter;
@@ -42,15 +42,14 @@
         try {
             OMElement payload = ClientUtil.getEchoOMElement();
 
-            Call call = new Call();
-            call.setTo(targetEPR);
-
-            //The boolean flag informs the axis2 engine to use two separate transport connection
-            //to retrieve the response.
-            call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+            Options options = new Options();
+            options.setTo(targetEPR);
+            options.setTransportInfo(Constants.TRANSPORT_HTTP,
                     Constants.TRANSPORT_HTTP,
                     true);
+
+            Call call = new Call();
+            call.setClientOptions(options);
 
             //Callback to handle the response
             Callback callback = new Callback() {

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/MailClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/MailClient.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/MailClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/MailClient.java Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.MessageSender;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -34,9 +35,13 @@
 
     public static void main(String[] args) throws AxisFault {
         MessageSender msgSender = new MessageSender();
-        msgSender.setTo(
+
+        Options options = new Options();
+        options.setTo(
                 new EndpointReference(toEpr));
-        msgSender.setSenderTransport(Constants.TRANSPORT_MAIL);
+        options.setSenderTransportProtocol(Constants.TRANSPORT_MAIL);
+        msgSender.setClientOptions(options);
+
         msgSender.send("echo", getPayload());
     }
 

Modified: webservices/axis2/trunk/java/modules/samples/src/userguide/clients/PingClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/samples/src/userguide/clients/PingClient.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/samples/src/userguide/clients/PingClient.java (original)
+++ webservices/axis2/trunk/java/modules/samples/src/userguide/clients/PingClient.java Wed Nov 30 00:23:02 2005
@@ -19,11 +19,12 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.MessageSender;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMElement;
 
 /**
  * Sample for fire-and-forget service invocation
- * Message Exchage Pattern IN-Only 
+ * Message Exchage Pattern IN-Only
  */
 public class PingClient {
     private static EndpointReference targetEPR = new EndpointReference("http://localhost:8080/axis2/services/MyService");
@@ -33,8 +34,11 @@
             OMElement payload = ClientUtil.getPingOMElement();
 
             MessageSender msgSender = new MessageSender();
-            msgSender.setTo(targetEPR);
-            msgSender.setSenderTransport(Constants.TRANSPORT_HTTP);
+
+            Options options = new Options();
+            msgSender.setClientOptions(options);
+            options.setTo(targetEPR);
+            options.setSenderTransportProtocol(Constants.TRANSPORT_HTTP);
 
             msgSender.send("ping", payload);
 

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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -39,14 +40,15 @@
 
     public static void main(String[] args) throws AxisFault {
 
+        Options options = new Options();
+        options.setTo(new EndpointReference(toEpr));
+        options.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
+
         Call call = new Call();
-        call.setTo(new EndpointReference(toEpr));
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                Constants.TRANSPORT_HTTP,
-                false);
+        call.setClientOptions(options);
         
-        call.set(Constants.Configuration.ENABLE_REST,Constants.VALUE_TRUE);
-
         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=349908&r1=349907&r2=349908&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 Wed Nov 30 00:23:02 2005
@@ -20,6 +20,7 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -40,8 +41,10 @@
     public static void main(String[] args) throws AxisFault {
 
         Call call = new Call();
-        call.setTo(new EndpointReference(toEpr));
-        call.setTransportInfo(Constants.TRANSPORT_TCP,
+        Options options = new 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));

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/client/STSClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/client/STSClient.java?rev=349908&r1=349907&r2=349908&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/client/STSClient.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/client/STSClient.java Wed Nov 30 00:23:02 2005
@@ -19,6 +19,7 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
+import org.apache.axis2.client.Options;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.security.handler.WSSHandlerConstants;
 import org.apache.axis2.security.handler.config.InflowConfiguration;
@@ -30,48 +31,51 @@
 
 /**
  * Client to interact with a given SecurityTokenService
- * 
+ *
  * @author Ruchith Fernando (ruchith.fernando@gmail.com)
  */
 public class STSClient {
 
-	private String stsUrl;
-	
-	private OutflowConfiguration outConfig;
-	private InflowConfiguration inConfig;
-	
-	public STSClient(String stsUrl, OutflowConfiguration outConfig, InflowConfiguration inConfig) {
-		this.stsUrl = stsUrl;
-		this.outConfig = outConfig;
-		this.inConfig = inConfig;
-	}
-
-	
-	public RequestSecurityTokenResponse doRequest(RequestSecurityToken rst) throws TrustException {
-		try {
-			Call call = new Call();
-			call.setTo(new EndpointReference(this.stsUrl));
-			call.set(WSSHandlerConstants.OUTFLOW_SECURITY,this.outConfig.getProperty());
-			call.set(WSSHandlerConstants.INFLOW_SECURITY,this.inConfig.getProperty());
-			
-			OMElement res = call.invokeBlocking(Constants.LN.REQUEST_SECURITY_TOKEN,this.prepareRequst(rst));
-			RequestSecurityTokenResponse rstr = new RequestSecurityTokenResponse(res);
-			return rstr;
-		} catch (AxisFault e) { 
-			throw new TrustException("Problem in communicating with the SecurityTokenService", e);
-		}
-	}
-	
-	/**
-	 * Do Encryption and Signing of the request
-	 * @param rst
-	 * @return
-	 * @throws TrustException
-	 */
-	private OMElement prepareRequst(RequestSecurityToken rst) throws TrustException {
-		
-		throw new UnsupportedOperationException();
-	}
-	
-	
+    private String stsUrl;
+
+    private OutflowConfiguration outConfig;
+    private InflowConfiguration inConfig;
+
+    public STSClient(String stsUrl, OutflowConfiguration outConfig, InflowConfiguration inConfig) {
+        this.stsUrl = stsUrl;
+        this.outConfig = outConfig;
+        this.inConfig = inConfig;
+    }
+
+
+    public RequestSecurityTokenResponse doRequest(RequestSecurityToken rst) throws TrustException {
+        try {
+            Call call = new Call();
+            Options options = new Options();
+            call.setClientOptions(options);
+            options.setTo(new EndpointReference(this.stsUrl));
+            options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, this.outConfig.getProperty());
+            options.setProperty(WSSHandlerConstants.INFLOW_SECURITY, this.inConfig.getProperty());
+
+            OMElement res = call.invokeBlocking(Constants.LN.REQUEST_SECURITY_TOKEN, this.prepareRequst(rst));
+            RequestSecurityTokenResponse rstr = new RequestSecurityTokenResponse(res);
+            return rstr;
+        } catch (AxisFault e) {
+            throw new TrustException("Problem in communicating with the SecurityTokenService", e);
+        }
+    }
+
+    /**
+     * Do Encryption and Signing of the request
+     *
+     * @param rst
+     * @return
+     * @throws TrustException
+     */
+    private OMElement prepareRequst(RequestSecurityToken rst) throws TrustException {
+
+        throw new UnsupportedOperationException();
+    }
+
+
 }