Java Code Examples for org.apache.axis2.client.Options#setTimeOutInMilliSeconds()

The following examples show how to use org.apache.axis2.client.Options#setTimeOutInMilliSeconds() . 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: AuthenticateStub.java    From micro-integrator with Apache License 2.0 6 votes vote down vote up
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) {
    long soTimeout = 5 * 60 * 1000; // Three minutes

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setTimeOutInMilliSeconds(soTimeout);
    System.out.println("XXXXXXXXXXXXXXXXXXX" + backendURL + client.getServiceContext().getAxisService().getName()
            .replaceAll("[^a-zA-Z]", ""));
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
    option.setTo(new EndpointReference(
            backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")));
    if (log.isDebugEnabled()) {
        log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
    }

    return stub;
}
 
Example 2
Source File: AuthenticateStub.java    From product-es with Apache License 2.0 6 votes vote down vote up
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) {
    long soTimeout = 5 * 60 * 1000; // Three minutes

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setTimeOutInMilliSeconds(soTimeout);
    System.out.println("XXXXXXXXXXXXXXXXXXX" +
                       backendURL +  client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""));
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
    option.setTo(new EndpointReference(backendURL +  client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")));
    if (log.isDebugEnabled()) {
        log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
    }

    return stub;
}
 
Example 3
Source File: RegistryCacheInvalidationClient.java    From carbon-apimgt with Apache License 2.0 6 votes vote down vote up
/**
 * Invalidates registry cache of the resource in the given path in given server
 * @param path registry path of the resource
 * @param tenantDomain
 * @param serverURL
 * @param cookie
 * @throws AxisFault
 * @throws RemoteException
 * @throws APIManagementException
 */
public void clearCache(String path, String tenantDomain, String serverURL, String cookie) 
        throws AxisFault, RemoteException, APIManagementException {
    RegistryCacheInvalidationServiceStub registryCacheServiceStub;

    ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
    registryCacheServiceStub = getRegistryCacheInvalidationServiceStub(serverURL, ctx);
    ServiceClient client = registryCacheServiceStub._getServiceClient();
    Options options = client.getOptions();
    options.setTimeOutInMilliSeconds(TIMEOUT_IN_MILLIS);
    options.setProperty(HTTPConstants.SO_TIMEOUT, TIMEOUT_IN_MILLIS);
    options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, TIMEOUT_IN_MILLIS);
    options.setManageSession(true);
    options.setProperty(HTTPConstants.COOKIE_STRING, cookie);
    
    try {
        registryCacheServiceStub.invalidateCache(path, tenantDomain);      
    } catch (RegistryCacheInvalidationServiceAPIManagementExceptionException e) {
        APIUtil.handleException(e.getMessage(), e);
    }
}
 
Example 4
Source File: ParallelRequestHelper.java    From product-ei with Apache License 2.0 6 votes vote down vote up
/**
 * constructor for parallel request helper
 * we can use this for the initial begin boxcarring request as well.(sending sessionCookie null)
 *
 * @param sessionCookie
 * @param operation
 * @param payload
 * @param serviceEndPoint
 * @throws org.apache.axis2.AxisFault
 */
public ParallelRequestHelper(String sessionCookie, String operation, OMElement payload, String serviceEndPoint) throws AxisFault {
    this.payload = payload;
    sender = new ServiceClient();
    Options options = new Options();
    options.setTo(new EndpointReference(serviceEndPoint));
    options.setProperty("__CHUNKED__", Boolean.FALSE);
    options.setTimeOutInMilliSeconds(45000L);
    options.setAction("urn:" + operation);
    sender.setOptions(options);
    if (sessionCookie != null && !sessionCookie.isEmpty()) {
        Header header = new Header("Cookie", sessionCookie);
        ArrayList headers = new ArrayList();
        headers.add(header);
        sender.getOptions().setProperty(HTTPConstants.HTTP_HEADERS, headers);
    }
}
 
Example 5
Source File: AuthenticateStubUtil.java    From product-cep with Apache License 2.0 5 votes vote down vote up
/**
 * Stub authentication method
 *
 * @param stub          valid stub
 * @param sessionCookie session cookie
 */
public static void authenticateStub(String sessionCookie, Stub stub) {
    long soTimeout = 5 * 60 * 1000; // Three minutes

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setTimeOutInMilliSeconds(soTimeout);
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
    if (log.isDebugEnabled()) {
        log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
    }
}
 
Example 6
Source File: AuthenticateStub.java    From product-ei with Apache License 2.0 5 votes vote down vote up
/**
 * Stub authentication method
 *
 * @param stub          valid stub
 * @param sessionCookie session cookie
 */
public static void authenticateStub(String sessionCookie, Stub stub) {
    long soTimeout = 5 * 60 * 1000; // Three minutes

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setTimeOutInMilliSeconds(soTimeout);
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
    if (log.isDebugEnabled()) {
        log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
    }
}
 
Example 7
Source File: RemoteUserManagerClient.java    From carbon-apimgt with Apache License 2.0 5 votes vote down vote up
public RemoteUserManagerClient(String cookie) throws APIManagementException {

		APIManagerConfiguration config = ServiceReferenceHolder.getInstance()
		                                                       .getAPIManagerConfigurationService()
		                                                       .getAPIManagerConfiguration();
		String serviceURL = config.getFirstProperty(APIConstants.AUTH_MANAGER_URL);
		String username = config.getFirstProperty(APIConstants.AUTH_MANAGER_USERNAME);
		String password = config.getFirstProperty(APIConstants.AUTH_MANAGER_PASSWORD);
		if (serviceURL == null || username == null || password == null) {
			throw new APIManagementException("Required connection details for authentication");
		}
		
		try {

			String clientRepo = CarbonUtils.getCarbonHome() + File.separator + "repository" +
                    File.separator + "deployment" + File.separator + "client";
			String clientAxisConf = CarbonUtils.getCarbonHome() + File.separator + "repository" +
                    File.separator + "conf" + File.separator + "axis2"+ File.separator +"axis2_client.xml";
			
			ConfigurationContext configContext = ConfigurationContextFactory. createConfigurationContextFromFileSystem(clientRepo,clientAxisConf);
			userStoreManagerStub = new RemoteUserStoreManagerServiceStub(configContext, serviceURL +
			                                                                   "RemoteUserStoreManagerService");
			ServiceClient svcClient = userStoreManagerStub._getServiceClient();
			CarbonUtils.setBasicAccessSecurityHeaders(username, password, svcClient);
			Options options = svcClient.getOptions();
			options.setTimeOutInMilliSeconds(TIMEOUT_IN_MILLIS);
			options.setProperty(HTTPConstants.SO_TIMEOUT, TIMEOUT_IN_MILLIS);
			options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, TIMEOUT_IN_MILLIS);
			options.setCallTransportCleanup(true);
			options.setManageSession(true);		
			options.setProperty(HTTPConstants.COOKIE_STRING, cookie);	
		
		} catch (AxisFault axisFault) {
			throw new APIManagementException(
			                                 "Error while initializing the remote user store manager stub",
			                                 axisFault);
		}
	}
 
Example 8
Source File: AuthenticateStubUtil.java    From product-ei with Apache License 2.0 5 votes vote down vote up
/**
 * Stub authentication method
 *
 * @param stub          valid stub
 * @param sessionCookie session cookie
 */
public static void authenticateStub(String sessionCookie, Stub stub) {
    long soTimeout = 5 * 60 * 1000; // Three minutes

    ServiceClient client = stub._getServiceClient();
    Options option = client.getOptions();
    option.setManageSession(true);
    option.setTimeOutInMilliSeconds(soTimeout);
    option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
    if (log.isDebugEnabled()) {
        log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
    }
}
 
Example 9
Source File: LoadbalanceFailoverClient.java    From product-ei with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service
 * @param proxyURL will be the location where load balancing proxy or sequence is defined.
 * @param serviceURL will be the URL for LBService
 * @return the response
 * @throws org.apache.axis2.AxisFault
 */
public String sendLoadBalanceRequest(String proxyURL,String serviceURL,String clientTimeoutInMilliSeconds) throws AxisFault {

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement value = fac.createOMElement("Value", null);
    value.setText("Sample string");

    Options options = new Options();
    if (proxyURL != null && !"null".equals(proxyURL)) {
        options.setTo(new EndpointReference(proxyURL));
    }

    options.setAction("urn:sampleOperation");

    long timeout = Integer.parseInt(getProperty("timeout", clientTimeoutInMilliSeconds));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    if (serviceURL != null && !"null".equals(serviceURL)) {
        // set addressing, transport and proxy url
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(serviceURL));
    }

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    OMElement responseElement = serviceClient.sendReceive(value);
    String response = responseElement.getText();

    return response;
}
 
Example 10
Source File: ServiceInvoker.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
public ServiceInvoker(String epr, String operation) {

        this.operation = operation;

        Options options = new Options();
        options.setTo(new EndpointReference(epr));
        options.setAction(operation);

        try {
            ConfigurationContext configContext = ConfigurationContextFactory.
                    createConfigurationContextFromFileSystem("client_repo", null);

            client = new ServiceClient(configContext, null);
            options.setTimeOutInMilliSeconds(10000000);

            client.setOptions(options);
            client.engageModule("addressing");

        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        }

        fac = OMAbstractFactory.getOMFactory();
        msg = fac.createOMElement("SampleMsg", null);

        OMElement load = fac.createOMElement("load", null);
        load.setText("1000");
        msg.addChild(load);
    }
 
Example 11
Source File: LoadbalanceFailoverClient.java    From product-ei with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service. No service endpoint is needed
 * @param URL will be the location where load balancing proxy or sequence is defined.     *
 * @return the response
 * @throws org.apache.axis2.AxisFault
 */
public String sendLoadBalanceFailoverRequest(String URL) throws AxisFault {

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement value = fac.createOMElement("Value", null);
    value.setText("Sample string");

    Options options = new Options();
    options.setTo(new EndpointReference(URL));

    options.setAction("urn:sampleOperation");


    long timeout = Integer.parseInt(getProperty("timeout", "10000000"));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    // set addressing, transport and proxy url
    serviceClient.engageModule("addressing");
    options.setTo(new EndpointReference("http://localhost:8280"));

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    serviceClient.getOptions().setTo(new EndpointReference(URL));
    OMElement responseElement = serviceClient.sendReceive(value);
    String response = responseElement.getText();

    return response;
}
 
Example 12
Source File: LocalEntryAdminClient.java    From carbon-apimgt with Apache License 2.0 5 votes vote down vote up
protected final void setup(Stub stub, Environment environment, ConfigurationContext configurationContext) throws AxisFault {
    String cookie = gatewayLogin(environment, configurationContext);
    ServiceClient serviceClient = stub._getServiceClient();
    Options options = serviceClient.getOptions();
    options.setTimeOutInMilliSeconds(15 * 60 * 1000);
    options.setProperty(HTTPConstants.SO_TIMEOUT, 15 * 60 * 1000);
    options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, 15 * 60 * 1000);
    options.setManageSession(true);
    options.setProperty(HTTPConstants.COOKIE_STRING, cookie);

}
 
Example 13
Source File: RemoteAuthorizationManagerClient.java    From carbon-apimgt with Apache License 2.0 5 votes vote down vote up
public RemoteAuthorizationManagerClient() {
    APIManagerConfiguration config = ServiceReferenceHolder.getInstance().
            getAPIManagerConfigurationService().getAPIManagerConfiguration();
    String serviceURL = config.getFirstProperty(APIConstants.AUTH_MANAGER_URL);
    username = config.getFirstProperty(APIConstants.AUTH_MANAGER_USERNAME);
    password = config.getFirstProperty(APIConstants.AUTH_MANAGER_PASSWORD);
    if (serviceURL == null || username == null || password == null) {
        throw new IllegalArgumentException("Required connection details for authentication " +
                "manager not provided");
    }

    try {
        authorizationManager = new RemoteAuthorizationManagerServiceStub(null, serviceURL +
                "RemoteAuthorizationManagerService");
        userStoreManager = new RemoteUserStoreManagerServiceStub(null, serviceURL +
                "RemoteUserStoreManagerService");
        for (ServiceClient client : new ServiceClient[] {
                authorizationManager._getServiceClient(),
                userStoreManager._getServiceClient()}) {
            Options options = client.getOptions();
            options.setTimeOutInMilliSeconds(TIMEOUT_IN_MILLIS);
            options.setProperty(HTTPConstants.SO_TIMEOUT, TIMEOUT_IN_MILLIS);
            options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, TIMEOUT_IN_MILLIS);
            options.setCallTransportCleanup(true);
            options.setManageSession(true);
        }
    } catch (AxisFault axisFault) {
        throw new IllegalArgumentException("Error while initializing the user management stubs. " +
                "Invalid parameter values passed into initializing the corresponding service clients might " +
                "potentially have been the issue", axisFault);
    }
}
 
Example 14
Source File: LoadbalanceFailoverClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service. No service endpoint is needed
 *
 * @param URL will be the location where load balancing proxy or sequence is defined.     *
 * @return the response
 * @throws org.apache.axis2.AxisFault
 */
public String sendLoadBalanceFailoverRequest(String URL) throws AxisFault {

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement value = fac.createOMElement("Value", null);
    value.setText("Sample string");

    Options options = new Options();
    options.setTo(new EndpointReference(URL));

    options.setAction("urn:sampleOperation");

    long timeout = Integer.parseInt(getProperty("timeout", "10000000"));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    // set addressing, transport and proxy url
    serviceClient.engageModule("addressing");
    options.setTo(new EndpointReference("http://localhost:8280"));

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    serviceClient.getOptions().setTo(new EndpointReference(URL));
    OMElement responseElement = serviceClient.sendReceive(value);
    String response = responseElement.getText();

    return response;
}
 
Example 15
Source File: LoadbalanceFailoverClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service which will invoke a sleep in the service
 *
 * @param proxyURL                    will be the location where load balancing proxy or sequence is defined.
 * @param sleepTimeInMilliSeconds
 * @param clientTimeoutInMilliSeconds
 * @return
 * @throws org.apache.axis2.AxisFault
 */
public String sendSleepRequest(String proxyURL, String sleepTimeInMilliSeconds, String clientTimeoutInMilliSeconds)
        throws AxisFault {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace omNs = fac.createOMNamespace("http://services.samples", "ns");
    OMElement sleepOperation = fac.createOMElement("sleepOperation", omNs);
    OMElement load = fac.createOMElement("load", null);
    load.setText(sleepTimeInMilliSeconds);
    sleepOperation.addChild(load);

    Options options = new Options();
    if (proxyURL != null && !"null".equals(proxyURL)) {
        options.setTo(new EndpointReference(proxyURL));
    }

    options.setAction("urn:sleepOperation");

    long timeout = Integer.parseInt(getProperty("timeout", clientTimeoutInMilliSeconds));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    OMElement responseElement = serviceClient.sendReceive(sleepOperation);
    String response = responseElement.getText();

    return response;
}
 
Example 16
Source File: LoadbalanceFailoverClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service
 *
 * @param proxyURL   will be the location where load balancing proxy or sequence is defined.
 * @param serviceURL will be the URL for LBService
 * @return the response
 * @throws org.apache.axis2.AxisFault
 */
public String sendLoadBalanceRequest(String proxyURL, String serviceURL, String clientTimeoutInMilliSeconds)
        throws AxisFault {

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement value = fac.createOMElement("Value", null);
    value.setText("Sample string");

    Options options = new Options();
    if (proxyURL != null && !"null".equals(proxyURL)) {
        options.setTo(new EndpointReference(proxyURL));
    }

    options.setAction("urn:sampleOperation");

    long timeout = Integer.parseInt(getProperty("timeout", clientTimeoutInMilliSeconds));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    if (serviceURL != null && !"null".equals(serviceURL)) {
        // set addressing, transport and proxy url
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(serviceURL));
    }

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    OMElement responseElement = serviceClient.sendReceive(value);
    String response = responseElement.getText();

    return response;
}
 
Example 17
Source File: LoadbalanceFailoverClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
/**
 * This method is used to send a single request to the load balancing service
 *
 * @param proxyURL   will be the location where load balancing proxy or sequence is defined.
 * @param serviceURL will be the URL for LBService
 * @return the response
 * @throws org.apache.axis2.AxisFault
 */
public String sendLoadBalanceRequest(String proxyURL, String serviceURL) throws AxisFault {

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement value = fac.createOMElement("Value", null);
    value.setText("Sample string");

    Options options = new Options();
    if (proxyURL != null && !"null".equals(proxyURL)) {
        options.setTo(new EndpointReference(proxyURL));
    }

    options.setAction("urn:sampleOperation");

    long timeout = Integer.parseInt(getProperty("timeout", "10000000"));
    System.out.println("timeout=" + timeout);
    options.setTimeOutInMilliSeconds(timeout);

    if (serviceURL != null && !"null".equals(serviceURL)) {
        // set addressing, transport and proxy url
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(serviceURL));
    }

    serviceClient.setOptions(options);

    serviceClient.getOptions().setManageSession(true);
    OMElement responseElement = serviceClient.sendReceive(value);
    String response = responseElement.getText();

    return response;
}
 
Example 18
Source File: LoadbalanceFailoverClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
public String sessionlessClient() throws AxisFault {

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMElement value = fac.createOMElement("Value", null);
        value.setText("Sample string");

        Options options = new Options();
        options.setTo(new EndpointReference("http://localhost:8480/services/LBService1"));

        options.setAction("urn:sampleOperation");

        long timeout = Integer.parseInt(getProperty("timeout", "10000000"));
        System.out.println("timeout=" + timeout);
        options.setTimeOutInMilliSeconds(timeout);

        // set addressing, transport and proxy url
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference("http://localhost:8480"));

        serviceClient.setOptions(options);
        String testString = "";

        long i = 0;
        while (i < 100) {

            serviceClient.getOptions().setManageSession(true);
            OMElement responseElement = serviceClient.sendReceive(value);
            String response = responseElement.getText();

            i++;
            System.out.println("Request: " + i + " ==> " + response);
            testString = testString.concat(":" + i + ">" + response + ":");
        }

        return testString;
    }
 
Example 19
Source File: LoadBalanceSessionFullClient.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
private void updateServiceClientOptions(String trpUrl, String addUrl, String prxUrl) throws AxisFault {
    Options options = new Options();
    options.setTo(new EndpointReference(trpUrl));
    options.setAction("urn:sampleOperation");
    options.setTimeOutInMilliSeconds(10000000);

    // set addressing, transport and proxy url
    if (addUrl != null && !"null".equals(addUrl)) {
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(addUrl));
    }
    if (trpUrl != null && !"null".equals(trpUrl)) {
        options.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl);
    } else {
        serviceClient.engageModule("addressing");
    }
    serviceClient.engageModule("addressing");
    if (prxUrl != null && !"null".equals(prxUrl)) {
        HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
        try {
            URL url = new URL(prxUrl);
            proxyProperties.setProxyName(url.getHost());
            proxyProperties.setProxyPort(url.getPort());
            proxyProperties.setUserName("");
            proxyProperties.setPassWord("");
            proxyProperties.setDomain("");
            options.setProperty(HTTPConstants.PROXY, proxyProperties);
        } catch (MalformedURLException e) {
            String msg = "Error while creating proxy URL";
            log.error(msg, e);
            throw new AxisFault(msg, e);
        }
    }
    serviceClient.setOptions(options);
}
 
Example 20
Source File: ServerAdminClient.java    From product-ei with Apache License 2.0 5 votes vote down vote up
public ServerAdminClient(String serverURL, String userName, String password) throws AxisFault {
    this.session = null;
    String serviceEPR = serverURL + "ServerAdmin";
    serverAdminStub = new ServerAdminStub(serviceEPR);
    ServiceClient client = serverAdminStub._getServiceClient();
    Options options = client.getOptions();
    options.setManageSession(true);
    options.setTimeOutInMilliSeconds(10000);

    CarbonUtils.setBasicAccessSecurityHeaders(userName, password, client);
}