org.wso2.carbon.humantask.stub.ui.task.client.api.HumanTaskClientAPIAdminStub Java Examples

The following examples show how to use org.wso2.carbon.humantask.stub.ui.task.client.api.HumanTaskClientAPIAdminStub. 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: HumanTaskClientAPIServiceClient.java    From product-ei with Apache License 2.0 5 votes vote down vote up
public HumanTaskClientAPIServiceClient(String cookie, String backendServerURL, ConfigurationContext configContext)
        throws AxisFault {
    String serviceURL = backendServerURL + HumanTaskSampleConstants.TASK_OPERATIONS_SERVICE;
    stub = new HumanTaskClientAPIAdminStub(configContext, serviceURL);
    ServiceClient client = stub._getServiceClient();
    Options options = client.getOptions();
    options.setManageSession(true);
    options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
}
 
Example #2
Source File: HumanTaskClientAPIAdminClient.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
public HumanTaskClientAPIAdminClient(String bpsURL, String username, char[] password) throws AxisFault {
    stub = new HumanTaskClientAPIAdminStub(bpsURL + WFImplConstant.HT_SERVICES_URL);
    ServiceClient serviceClient = stub._getServiceClient();
    Options options = serviceClient.getOptions();
    HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
    auth.setUsername(username);
    auth.setPassword(new String(password));
    auth.setPreemptiveAuthentication(true);
    List<String> authSchemes = new ArrayList<>();
    authSchemes.add(HttpTransportProperties.Authenticator.BASIC);
    auth.setAuthSchemes(authSchemes);
    options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, auth);
    serviceClient.setOptions(options);
}
 
Example #3
Source File: HumanTaskClientAPIAdminClient.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
public HumanTaskClientAPIAdminClient(String bpsURL, String username) throws AxisFault {

        stub = new HumanTaskClientAPIAdminStub(bpsURL + WFImplConstant.HT_SERVICES_URL);
        ServiceClient serviceClient = stub._getServiceClient();
        OMElement mutualSSLHeader;
        try {
            String headerString = WFImplConstant.MUTUAL_SSL_HEADER.replaceAll("\\$username", username);
            mutualSSLHeader = AXIOMUtil.stringToOM(headerString);
            serviceClient.addHeader(mutualSSLHeader);
        } catch (XMLStreamException e) {
            throw new AxisFault("Error while creating mutualSSLHeader XML Element.", e);
        }
        Options options = serviceClient.getOptions();
        serviceClient.setOptions(options);
    }
 
Example #4
Source File: HumanTaskAdminClient.java    From product-es with Apache License 2.0 5 votes vote down vote up
public HumanTaskAdminClient(String backEndUrl, String sessionCookie) throws AxisFault {
	htStub = new HumanTaskClientAPIAdminStub(backEndUrl + "HumanTaskClientAPIAdmin");
	AuthenticateStub.authenticateStub(sessionCookie, htStub);

	umStub = new UserAdminStub(backEndUrl + "UserAdmin");
	AuthenticateStub.authenticateStub(sessionCookie, umStub);

	wlStub = new WorkListServiceStub(backEndUrl + "WorkListService");
	AuthenticateStub.authenticateStub(sessionCookie, wlStub);
}
 
Example #5
Source File: HumanTaskAdminClient.java    From product-es with Apache License 2.0 5 votes vote down vote up
public HumanTaskAdminClient(String backEndUrl, String userName, String password) throws AxisFault {

		htStub = new HumanTaskClientAPIAdminStub(backEndUrl + "HumanTaskClientAPIAdmin");
		AuthenticateStub.authenticateStub(userName, password, htStub);

		umStub = new UserAdminStub(backEndUrl + "UserAdmin");
		AuthenticateStub.authenticateStub(userName, password, umStub);

		wlStub = new WorkListServiceStub(backEndUrl + "WorkListService");
		AuthenticateStub.authenticateStub(userName, password, wlStub);
	}