Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import org.wso2.am.admin.clients.registry.ResourceAdminServiceClient;
import org.wso2.carbon.endpoint.stub.types.EndpointAdminEndpointAdminException;
import org.wso2.carbon.registry.info.stub.RegistryExceptionException;
import org.wso2.carbon.registry.resource.stub.ResourceAdminServiceExceptionException;
import org.wso2.carbon.rest.api.stub.RestApiAdminAPIException;
import java.rmi.RemoteException;
public class ResourceAdminServiceClientSample {
public static void main(String[] args) throws RemoteException, RestApiAdminAPIException, EndpointAdminEndpointAdminException, RegistryExceptionException, ResourceAdminServiceExceptionException {
System.setProperty("javax.net.ssl.trustStore", "/Users/ishikura/wso2am/wso2am-2.1.0/repository/resources/security/wso2carbon.jks");
final String backendUrl = "https://localhost:9443/services/";
final String userName = "admin";
final String password = "admin";
final String path = "/_system/governance/apimgt/applicationdata/workflow-extensions.xml";
final ResourceAdminServiceClient client = new ResourceAdminServiceClient(backendUrl, userName, password);
System.out.println(client.getTextContent(path));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment