org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub Java Examples
The following examples show how to use
org.wso2.carbon.identity.application.mgt.stub.IdentityApplicationManagementServiceStub.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ApplicationManagementServiceClient.java From carbon-identity-framework with Apache License 2.0 | 6 votes |
/** * @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); } }
Example #2
Source File: ApplicationManagementServiceClient.java From carbon-identity with Apache License 2.0 | 6 votes |
/** * @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); } }
Example #3
Source File: IdentityApplicationManagementServiceClient.java From attic-stratos with Apache License 2.0 | 6 votes |
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); } }