axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r367618 - /webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java
Date Tue, 10 Jan 2006 14:42:36 GMT
Author: saminda
Date: Tue Jan 10 06:42:27 2006
New Revision: 367618

URL: http://svn.apache.org/viewcvs?rev=367618&view=rev
Log:
Updated security client 

Modified:
    webservices/axis2/trunk/java/modules/samples/src/sample/security/Client.java

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=367618&r1=367617&r2=367618&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 Tue Jan 10
06:42:27 2006
@@ -18,9 +18,12 @@
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Call;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
 import org.apache.axis2.om.OMFactory;
@@ -43,15 +46,17 @@
             String port = args[1];
 
             OMElement payload = getEchoElement();
-            Call call = new Call(repo);
+            ConfigurationContextFactory fac = new ConfigurationContextFactory();
+            ConfigurationContext configContext = fac.createConfigurationContextFromFileSystem(repo);
+            ServiceClient serviceClient = new ServiceClient(configContext, null);
             Options options = new Options();
-            call.setClientOptions(options);
+            serviceClient.setOptions(options);
             options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
             options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
             options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
 
             //Blocking invocation
-            OMElement result = call.invokeBlocking("echo", payload);
+            OMElement result = serviceClient.sendReceive(payload);
 
             StringWriter writer = new StringWriter();
             result.serialize(XMLOutputFactory.newInstance()



Mime
View raw message