protected WsrfResourceStub(EndpointReference resourceEpr, long timeout) { this.resourceEndpointReference = resourceEpr; logger.info("resourceEprInWsrfResourceStub Constructor" + resourceEpr.toString()); timeoutInMilliSeconds = timeout; opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(resourceEpr); opts.setTimeOutInMilliSeconds(timeout); }
protected WsrfResourceStub(EndpointReference resourceEpr, long timeout) { this.resourceEndpointReference = resourceEpr; logger.info("resourceEprInWsrfResourceStub Constructor" + resourceEpr.toString()); timeoutInMilliSeconds = timeout; opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(resourceEpr); opts.setTimeOutInMilliSeconds(timeout); }
public void addExtension(String name, DataHandler content) throws Exception { try { Options options = stub._getServiceClient().getOptions(); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setTimeOutInMilliSeconds(300000); stub.addExtension(name, content); } catch (Exception e) { String msg = "Failed to add extension."; log.error(msg, e); throw e; } }
public void restoreToDefaults() throws Exception { try { ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); option.setTimeOutInMilliSeconds(1000 * 180); stub.restoreDefaults(); } catch (Exception e) { String msg = "Error occurred while restoring global Log4j configuration."; log.error(msg, e); throw e; } }
public CSVUploaderClient(ConfigurationContext ctx, String serviceURL, String cookie)throws AxisFault{ stub=new EventSimulatorAdminServiceStub(ctx,serviceURL); Options options = stub._getServiceClient().getOptions(); options.setManageSession(true); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); //Increase the time out when sending large attachments options.setTimeOutInMilliSeconds(60*1000); uploadServiceTypeList=new ArrayList<UploadedFileItemDto>(); }
public ActivityDashboardClient(String cookie, String backEndServerURL, ConfigurationContext configCtx) throws AxisFault { String serviceURL = backEndServerURL + "ActivityDashboardAdminService"; stub = new ActivityDashboardAdminServiceStub(configCtx, serviceURL); ServiceClient client = stub._getServiceClient(); Options option = client.getOptions(); int timeout = 5 * 60 * 1000; // 1 hour option.setTimeOutInMilliSeconds(timeout); option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); option.setProperty(HTTPConstants.SO_TIMEOUT, timeout); option.setProperty(HTTPConstants.CONNECTION_TIMEOUT, timeout); option.setManageSession(true); option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); }
private void initStub(String cookie) throws AxisFault { String serviceURL = AuthAdminServiceClient.SERVICE_URL + "RestApiAdmin"; stub = new RestApiAdminStub(null, serviceURL); ServiceClient client = stub._getServiceClient(); Options options = client.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(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); }
public RestApiAdminClient(ConfigurationContext configCtx, String backendServerURL, String cookie, Locale locale) throws AxisFault { bundle = ResourceBundle.getBundle(BUNDLE, locale); String serviceURL = backendServerURL + "RestApiAdmin"; stub = new RestApiAdminStub(configCtx, serviceURL); ServiceClient client = stub._getServiceClient(); Options options = client.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(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); }
@Override public void init() { try { stub = new CloudControllerServiceStub(CLOUD_CONTROLLER_EPR); stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); } catch (AxisFault axisFault) { String msg = "Failed to initiate AutoscalerService client. " + axisFault.getMessage(); log.error(msg, axisFault); throw new RuntimeException(msg, axisFault); } }
public DBSFileUploadClient(ConfigurationContext ctx, String serverURL, String cookie) throws AxisFault { String serviceUploaderServiceEPR = serverURL + "DataServiceFileUploader"; serviceUploaderStub = new DataServiceFileUploaderStub(ctx, serviceUploaderServiceEPR); ServiceClient client = serviceUploaderStub._getServiceClient(); Options options = client.getOptions(); options.setManageSession(true); options.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setTimeOutInMilliSeconds(10000); }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { long soTimeout = 5 * 60 * 1000; // Five 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); 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; }
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) { // Three minutes long soTimeout = 5 * 60 * 1000; 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); option.setTo(new EndpointReference( backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""))); return stub; }
public LogViewerClient(String backEndUrl, String sessionCookie) throws AxisFault { String endpoint = backEndUrl + serviceName; logViewerStub = new LogViewerStub(endpoint); logViewerStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); AuthenticateStub.authenticateStub(sessionCookie, logViewerStub); }
public LogViewerClient(String backEndURL, String userName, String password) throws AxisFault { String endpoint = backEndURL + serviceName; logViewerStub = new LogViewerStub(endpoint); logViewerStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); AuthenticateStub.authenticateStub(userName, password, logViewerStub); }
public CloudControllerServiceClient(String epr) throws AxisFault { ConfigurationContext clientConfigContext = DataHolder.getClientConfigContext(); try { stub = new CloudControllerServiceStub(clientConfigContext, epr); stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); } catch (AxisFault axisFault) { String msg = "Failed to initiate AutoscalerService client. " + axisFault.getMessage(); log.error(msg, axisFault); throw new AxisFault(msg, axisFault); } }
public static Options getOptions(String soapAction, long timeout, EndpointReference destination) { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setAction(soapAction); opts.setTimeOutInMilliSeconds(timeout); opts.setMessageId(UUIDGenerator.getUUID()); opts.setTo(destination); return opts; }
public LogViewerClient(String backEndUrl, String sessionCookie) throws AxisFault { String endpoint = backEndUrl + serviceName; logViewerStub = new LogViewerStub(endpoint); logViewerStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); AuthenticateStubUtil.authenticateStub(sessionCookie, logViewerStub); }
public LogViewerClient(String backEndURL, String userName, String password) throws AxisFault { String endpoint = backEndURL + serviceName; logViewerStub = new LogViewerStub(endpoint); logViewerStub._getServiceClient().getOptions().setTimeOutInMilliSeconds(300000); AuthenticateStubUtil.authenticateStub(userName, password, logViewerStub); }
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; }
public static Options getOptions(String soapAction, long timeout, EndpointReference destination) { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setAction(soapAction); opts.setTimeOutInMilliSeconds(timeout); opts.setMessageId(UUIDGenerator.getUUID()); opts.setTo(destination); return opts; }