コード例 #1
0
  // This method will read synapse.xml files
  public String readSynapseFile() throws Exception {
    ESBCommon esbCommon = new ESBCommon(selenium);
    Properties properties = new Properties();
    String conCatLines = "exact:";
    try {
      // Open the file
      FileInputStream fstream =
          new FileInputStream(esbCommon.getCarbonHome() + "/conf/synapse.xml");
      // Get the object of DataInputStream
      DataInputStream in = new DataInputStream(fstream);
      BufferedReader br = new BufferedReader(new InputStreamReader(in));
      String strLine;

      // Read File Line By Line
      while ((strLine = br.readLine()) != null) {
        strLine = strLine.trim();
        conCatLines = conCatLines + strLine + " ";
      }
      // Close the input stream
      in.close();
      // return conCatLines;
    } catch (Exception e) { // Catch exception if any
      System.err.println("Error: " + e.getMessage());
    }
    return conCatLines;
  }
コード例 #2
0
 /*
 Method to set Proxy Service General settings
  */
 public void testSetGeneralSettings() throws Exception {
   ESBCommon esbCommon = new ESBCommon(selenium);
   ESBAddProxyServiceTest esbAddProxyServiceTest = new ESBAddProxyServiceTest(selenium);
   // Options which could be used are Specify in-line, Specify source URL, Pick from registry, None
   esbAddProxyServiceTest.addProxyName("StockQuoteProxy251", "Custom Proxy");
   esbAddProxyServiceTest.addSourceUrlWsdl(
       "file:"
           + esbCommon.getCarbonHome()
           + "/repository/samples/resources/proxy/sample_proxy_1.wsdl");
   esbAddProxyServiceTest.specifyStartOnload("true");
   System.out.println("Setting general settings");
 }