Examples of WSRegistryServiceClient


Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

        System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
        System.setProperty("javax.net.ssl.trustStoreType","JKS");
        try {
            configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo, axis2Conf);

            registry =  new WSRegistryServiceClient(serverURL, "admin", "admin", configContext);
//            registry.addSecurityOptions(policyPath, CARBON_HOME + "/resources/security/wso2carbon.jks");

        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("Failed to authenticate the client. Caused by: " + e.getMessage());
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

        }
        return registry;
    }

  public static void main(String[] args) throws Exception {
    WSRegistryServiceClient client;
    client = initialize();
    Resource resource = client.newResource();
    resource.setContent("Hello Out there!");

    String resourcePath = "/abc";
    registry.put(resourcePath, resource);
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

        System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
        System.setProperty("javax.net.ssl.trustStoreType", "JKS");
        try {
            configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo, axis2Conf);

            registry = new WSRegistryServiceClient(serverURL, "admin", "admin", configContext);
//            registry.addSecurityOptions(policyPath, CARBON_HOME + "/resources/security/wso2carbon.jks");

        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("Failed to authenticate the client. Caused by: " + e.getMessage());
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

    }


    public String getResourceContent(String regPath) throws Exception{

        WSRegistryServiceClient client;
    client = initialize();
    /*Resource resource = client.newResource();
    resource.setContent("Hello Out there!");*/

    String resourcePath = "/abc";
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

                        registryURL = registryURL.substring(0, registryURL.length() - 1);
                    }
                    String serverURL = registryURL.substring(0, registryURL.indexOf("/registry"))
                            + "/services/";
                    RegistryUtils.setTrustStoreSystemProperties();
                    client = new WSRegistryServiceClient(serverURL, username, password,
                            configurationContext);
                    return client;
                }

                throw new RegistryException("Unable to create an instance of a WS Registry");
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

  @Override
  protected void setUp() throws Exception {
    // TODO Auto-generated method stub
    super.setUp();
    try {
      everyOneRegistry = new WSRegistryServiceClient(serverURL, "testuser1", "testuser1", configContext);
    } catch (RegistryException e) {
      fail("everyone role was not able to authenticate - check permissions");
    }
  }
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

        System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
        System.setProperty("javax.net.ssl.trustStoreType","JKS");
        try {
            configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo, axis2Conf);
            authenticate(configContext, serverURL);
            registry = new WSRegistryServiceClient(serverURL, "admin", "admin", configContext);
//            registry.addSecurityOptions(policyPath, CARBON_HOME + "/resources/security/wso2carbon.jks");
           
        } catch (Exception e) {
            e.printStackTrace();
            fail("Failed to authenticate the client. Caused by: " + e.getMessage());
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

        System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
        System.setProperty("javax.net.ssl.trustStoreType","JKS");
        try {
            configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(axis2Repo, axis2Conf);
            authenticate(configContext, serverURL);
            registry = new WSRegistryServiceClient(serverURL, "admin", "admin", configContext);
            registry.addSecurityOptions(policyPath, CARBON_HOME + "/resources/security/wso2carbon.jks");
           
        } catch (Exception e) {
            e.printStackTrace();
            fail("Failed to authenticate the client. Caused by: " + e.getMessage());
View Full Code Here

Examples of org.wso2.carbon.registry.ws.client.registry.WSRegistryServiceClient

  @Override
  protected void setUp() throws Exception {
    // TODO Auto-generated method stub
    super.setUp();
    try {
      everyOneRegistry = new WSRegistryServiceClient(serverURL, "testuser1", "testuser1",
                    configContext);
    } catch (RegistryException e) {
      fail("everyone role was not able to authenticate - check permissions");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.