本文整理汇总了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);
}
}
示例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);
}
}