認証証明書を使用して WSO2 (CEP) 管理サービスに接続することはできますか?
https://localhost:9443/services/UserAdmin?wsdl
はいの場合、これを行う方法は?
認証証明書を使用して WSO2 (CEP) 管理サービスに接続することはできますか?
https://localhost:9443/services/UserAdmin?wsdl
はいの場合、これを行う方法は?
Admin Services API へのアクセスは、すべての WSO2 製品で共通です。SSL で通信するには、製品で使用される公開証明書を使用する必要があります。
次のサンプルを参照できます
import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException;
import org.wso2.carbon.authenticator.stub.LogoutAuthenticationExceptionException;
import org.wso2.carbon.service.mgt.stub.types.carbon.ServiceMetaData;
import org.wso2.carbon.service.mgt.stub.types.carbon.ServiceMetaDataWrapper;
import java.rmi.RemoteException;
public class ListServices {
public static void main(String[] args)
throws RemoteException, LoginAuthenticationExceptionException,
LogoutAuthenticationExceptionException {
System.setProperty("javax.net.ssl.trustStore", "$CEP_HOME/repository/resources/security/wso2carbon.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "wso2carbon");
System.setProperty("javax.net.ssl.trustStoreType", "JKS");
String backEndUrl = "https://localhost:9443";
LoginAdminServiceClient login = new LoginAdminServiceClient(backEndUrl);
String session = login.authenticate("admin", "admin");
ServiceAdminClient serviceAdminClient = new ServiceAdminClient(backEndUrl, session);
ServiceMetaDataWrapper serviceList = serviceAdminClient.listServices();
System.out.println("Service Names:");
for (ServiceMetaData serviceData : serviceList.getServices()) {
System.out.println(serviceData.getName());
}
login.logOut();
}
}
詳しくはこちら