public void testCheckSecurityScenario15CSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    String serviceName = "CSVDataService";
    String nameSpace = "http://ws.wso2.org/dataservice";
    String soapAction = "urn:getAllCustomer";
    String operation = "getAllCustomer";

    instServiceManagement.Login();
    instServiceManagement.enableSecurityScenario(serviceName, "scenario14");
    OMElement result =
        new SecurityClient()
            .runSecurityClient("scenario14", serviceName, nameSpace, soapAction, operation, "s");
    System.out.println(result);

    String csvExpectedResult = "Boston";
    String output =
        result
            .getFirstElement()
            .getAttributeValue(new QName("http://ws.wso2.org/dataservice", "address"));
    assertEquals(csvExpectedResult, output);

    Thread.sleep(1000);
    instServiceManagement.disableSecurity(serviceName);
  }
  public void testDeleteKeystoreCSVDataService() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);
    KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.disableSecurity("CSVDataService");
    instKeyStoreManagement.deleteKeyStore("qaserver.jks");
  }
Пример #3
0
  public void testHttpsSecurityScenario() throws Exception {
    ServiceManagement instServiceManagement = new ServiceManagement(browser);

    instServiceManagement.Login();
    instServiceManagement.enableSecurityScenario("Axis2Service", "scenario1");
    browser.click("//table[@id='serviceOperationsTable']/tbody/tr[3]/td[2]/a");
    browser.waitForPageToLoad("30000");
    assertTrue(browser.isTextPresent("All enabled transport listeners are already added "));
    browser.click("//input[@value='Finish']");
    browser.waitForPageToLoad("30000");
    instServiceManagement.disableSecurity("Axis2Service");
  }