svn commit r44325 - trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit r44325 - trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client

Evanthika Amarasiri
Author: evanthika
Date: Fri Aug 28 01:21:16 2009
New Revision: 44325
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=44325

Log:
Common properties read fron framework.properties file

Modified:
   trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client/ESBSecurityClient.java

Modified: trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client/ESBSecurityClient.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client/ESBSecurityClient.java?rev=44325&r1=44324&r2=44325&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client/ESBSecurityClient.java (original)
+++ trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/client/ESBSecurityClient.java Fri Aug 28 01:21:16 2009
@@ -49,11 +49,17 @@
         Properties properties = new Properties();
         OMElement result = null;
         boolean output = false;
-        properties.load(new FileInputStream(".."+File.separator+"esb"+File.separator+"src"+File.separator+"test"+File.separator+"resources"+File.separator+"esb.properties"));
+        boolean stockQuoteResponse = false;
+        //Reading the framework.properties file
+        properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
+        String context_root =  properties.getProperty("context.root");        
         String carbon_home = properties.getProperty("carbon.home");
         String host_name = properties.getProperty("host.name");
-        String http_port = properties.getProperty("http.port");
-        String https_port = properties.getProperty("https.port");
+
+        //Reading the esb.properties file
+        properties.load(new FileInputStream(".."+File.separator+"esb"+File.separator+"src"+File.separator+"test"+File.separator+"resources"+File.separator+"esb.properties"));
+        String http_port = properties.getProperty("nio.http.port");
+        
         System.setProperty("javax.net.ssl.trustStore", carbon_home + File.separator + "resources" + File.separator + "security" + File.separator + "wso2carbon.jks");
         System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
 
@@ -69,6 +75,25 @@
 //            opts.setTo(new EndpointReference("http://" + host_name + ":" + http_port + "/services/" + serviceName));
 //        }
 
+
+        if (context_root.equals(null))
+        {
+            opts.setTo(new EndpointReference("http://" + host_name + ":" + http_port + "/services/" + serviceName));
+        }
+        else
+        {
+            opts.setTo(new EndpointReference("http://" + host_name + ":" + http_port+"/"+context_root+"/services/" + serviceName));
+
+        }
+
+        if (stockQuoteResponse){
+            System.out.println("The response received!!!!");
+        }else{
+            System.out.println("Client Failed!!!!");
+        }
+        Thread.sleep(5000);
+
+
         opts.setTo(new EndpointReference("http://" + host_name + ":" + http_port + "/services/" + serviceName));
         
         opts.setAction(SoapAction);

_______________________________________________
Commons-dev mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/commons-dev