当前位置: 首页>>代码示例>>Java>>正文


Java IdentityApplicationManagementServiceStub类代码示例

本文整理汇总了Java中org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub的典型用法代码示例。如果您正苦于以下问题:Java IdentityApplicationManagementServiceStub类的具体用法?Java IdentityApplicationManagementServiceStub怎么用?Java IdentityApplicationManagementServiceStub使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IdentityApplicationManagementServiceStub类属于org.wso2.carbon.identity.application.mgt.stub包,在下文中一共展示了IdentityApplicationManagementServiceStub类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ApplicationManagementServiceClient

import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub; //导入依赖的package包/类
/**
 * @param cookie
 * @param backendServerURL
 * @param configCtx
 * @throws AxisFault
 */
public ApplicationManagementServiceClient(String cookie, String backendServerURL,
                                          ConfigurationContext configCtx) throws AxisFault {

    String serviceURL = backendServerURL + "IdentityApplicationManagementService";
    String userAdminServiceURL = backendServerURL + "UserAdmin";
    stub = new IdentityApplicationManagementServiceStub(configCtx, serviceURL);
    userAdminStub = new UserAdminStub(configCtx, userAdminServiceURL);

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);

    ServiceClient userAdminClient = userAdminStub._getServiceClient();
    Options userAdminOptions = userAdminClient.getOptions();
    userAdminOptions.setManageSession(true);
    userAdminOptions.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);

    if (debugEnabled) {
        log.debug("Invoking service " + serviceURL);
    }

}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:30,代码来源:ApplicationManagementServiceClient.java

示例2: IdentityApplicationManagementServiceClient

import org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub; //导入依赖的package包/类
public IdentityApplicationManagementServiceClient(String epr) throws AxisFault {

        XMLConfiguration conf = ConfUtil.getInstance(null).getConfiguration();
        int autosclaerSocketTimeout = conf.getInt("autoscaler.identity.clientTimeout", 180000);
        try {
            ServerConfiguration serverConfig = CarbonUtils.getServerConfiguration();
            String trustStorePath = serverConfig.getFirstProperty("Security.TrustStore.Location");
            String trustStorePassword = serverConfig.getFirstProperty("Security.TrustStore.Password");
            String type = serverConfig.getFirstProperty("Security.TrustStore.Type");

            System.setProperty("javax.net.ssl.trustStore", trustStorePath);
            System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);
            System.setProperty("javax.net.ssl.trustStoreType", type);

            stub = new IdentityApplicationManagementServiceStub(epr);
            stub._getServiceClient().getOptions().setProperty(HTTPConstants.SO_TIMEOUT, autosclaerSocketTimeout);
            stub._getServiceClient().getOptions().setProperty(HTTPConstants.CONNECTION_TIMEOUT, autosclaerSocketTimeout);
	        String username = conf.getString("autoscaler.identity.adminUser", "admin");
            Utility.setAuthHeaders(stub._getServiceClient(), username);

        } catch (AxisFault axisFault) {
            String msg = "Failed to initiate identity service client. " + axisFault.getMessage();
            log.error(msg, axisFault);
            throw new AxisFault(msg, axisFault);
        }
    }
 
开发者ID:apache,项目名称:stratos,代码行数:27,代码来源:IdentityApplicationManagementServiceClient.java


注:本文中的org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。