Package org.apache.manifoldcf.crawler.connectors.meridio

Examples of org.apache.manifoldcf.crawler.connectors.meridio.ConnectionConfig


    this.connectionManager = new MultiThreadedHttpConnectionManager();
    this.connectionManager.getParams().setMaxTotalConnections(1);
    this.clientWorkstation = clientWorkstation;

    // Set up the configuration info object
    ConnectionConfig cc;
    int index = userName.indexOf("\\");
    String domainUser;
    String domain;
    if (index != -1)
    {
      domainUser = userName.substring(index+1);
      domain = userName.substring(0,index);
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"', domain is '"+domain+"'");
    }
    else
    {
      domain = null;
      domainUser = userName;
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"'; there is no domain specified");
    }

    if (oLog != null && oLog.isDebugEnabled())
    {
      if (password != null && password.length() > 0)
        oLog.debug("Meridio: Password exists");
      else
        oLog.debug("Meridio: Password is null");
    }

    // Set up the stub handles
    /*=================================================================
    * Get a handle to the DMWS
    *================================================================*/
    MeridioDMLocator meridioDMLocator = new MeridioDMLocator(engineConfiguration);
    MeridioDMSoapStub meridioDMWebService = new MeridioDMSoapStub(meridioDmwsUrl, meridioDMLocator);

    meridioDMWebService.setPortName(meridioDMLocator.getMeridioDMSoapWSDDServiceName());
    // I believe that setting the username and password this way is no longer needed...
    meridioDMWebService.setUsername(userName);
    meridioDMWebService.setPassword(password);
    // Here's the real way to send in user/password
    cc = new ConnectionConfig(protocolFactory,connectionManager,dmwsProxyHost,(dmwsProxyPort!=null&&dmwsProxyPort.length()>0)?new Integer(dmwsProxyPort):null,
      domain,domainUser,password);
    dmwsConfig = cc;
    meridioDMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioDMWebService_ = meridioDMWebService;

    /*=================================================================
    * Get a handle to the RMWS
    *================================================================*/
    MeridioRMLocator meridioRMLocator = new MeridioRMLocator(engineConfiguration);
    MeridioRMSoapStub meridioRMWebService = new MeridioRMSoapStub(meridioRmwsUrl, meridioRMLocator);

    meridioRMWebService.setPortName(meridioRMLocator.getMeridioRMSoapWSDDServiceName());
    meridioRMWebService.setUsername(userName);
    meridioRMWebService.setPassword(password);
    cc = new ConnectionConfig(protocolFactory,connectionManager,rmwsProxyHost,(rmwsProxyPort!=null&&rmwsProxyPort.length()>0)?new Integer(rmwsProxyPort):null,
      domain,domainUser,password);
    rmwsConfig = cc;
    meridioRMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioRMWebService_ = meridioRMWebService;
View Full Code Here


    this.connectionManager = new MultiThreadedHttpConnectionManager();
    this.connectionManager.getParams().setMaxTotalConnections(1);
    this.clientWorkstation = clientWorkstation;

    // Set up the configuration info object
    ConnectionConfig cc;
    int index = userName.indexOf("\\");
    String domainUser;
    String domain;
    if (index != -1)
    {
      domainUser = userName.substring(index+1);
      domain = userName.substring(0,index);
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"', domain is '"+domain+"'");
    }
    else
    {
      domain = null;
      domainUser = userName;
      if (oLog != null && oLog.isDebugEnabled())
        oLog.debug("Meridio: User is '"+domainUser+"'; there is no domain specified");
    }

    if (oLog != null && oLog.isDebugEnabled())
    {
      if (password != null && password.length() > 0)
        oLog.debug("Meridio: Password exists");
      else
        oLog.debug("Meridio: Password is null");
    }

    // Set up the stub handles
    /*=================================================================
    * Get a handle to the DMWS
    *================================================================*/
    MeridioDMLocator meridioDMLocator = new MeridioDMLocator(engineConfiguration);
    MeridioDMSoapStub meridioDMWebService = new MeridioDMSoapStub(meridioDmwsUrl, meridioDMLocator);

    meridioDMWebService.setPortName(meridioDMLocator.getMeridioDMSoapWSDDServiceName());
    // I believe that setting the username and password this way is no longer needed...
    meridioDMWebService.setUsername(userName);
    meridioDMWebService.setPassword(password);
    // Here's the real way to send in user/password
    cc = new ConnectionConfig(protocolFactory,connectionManager,dmwsProxyHost,(dmwsProxyPort!=null&&dmwsProxyPort.length()>0)?new Integer(dmwsProxyPort):null,
      domain,domainUser,password);
    dmwsConfig = cc;
    meridioDMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioDMWebService_ = meridioDMWebService;

    /*=================================================================
    * Get a handle to the RMWS
    *================================================================*/
    MeridioRMLocator meridioRMLocator = new MeridioRMLocator(engineConfiguration);
    MeridioRMSoapStub meridioRMWebService = new MeridioRMSoapStub(meridioRmwsUrl, meridioRMLocator);

    meridioRMWebService.setPortName(meridioRMLocator.getMeridioRMSoapWSDDServiceName());
    meridioRMWebService.setUsername(userName);
    meridioRMWebService.setPassword(password);
    cc = new ConnectionConfig(protocolFactory,connectionManager,rmwsProxyHost,(rmwsProxyPort!=null&&rmwsProxyPort.length()>0)?new Integer(rmwsProxyPort):null,
      domain,domainUser,password);
    rmwsConfig = cc;
    meridioRMWebService._setProperty( CONFIGURATION_PROPERTY, cc);

    meridioRMWebService_ = meridioRMWebService;
View Full Code Here

    }
    try {
      URL targetURL =
        new URL(msgContext.getStrProp(MessageContext.TRANS_URL));

      ConnectionConfig configInfo = (ConnectionConfig)msgContext.getProperty(MeridioWrapper.CONFIGURATION_PROPERTY);
      HttpConnectionManager localConnectionManager = configInfo.getConnectionManager();
      if (localConnectionManager == null)
        localConnectionManager = connectionManager;

      // no need to retain these, as the cookies/credentials are
      // stored in the message context across multiple requests.
      // the underlying connection manager, however, is retained
      // so sockets get recycled when possible.
      HttpClient httpClient = new HttpClient(localConnectionManager);
      // the timeout value for allocation of connections from the pool
      httpClient.getParams().setConnectionManagerTimeout(this.clientProperties.getConnectionPoolTimeout());
      // Set our protocol factory, in case there's a redirect
      ProtocolFactory myFactory = configInfo.getProtocolFactory();
      if (myFactory != null)
        httpClient.getParams().setParameter(org.apache.commons.httpclient.params.HttpClientParams.PROTOCOL_FACTORY,myFactory);
      // Allow circular redirections
      httpClient.getParams().setParameter(org.apache.commons.httpclient.params.HttpClientParams.ALLOW_CIRCULAR_REDIRECTS,new Boolean(true));
View Full Code Here

TOP

Related Classes of org.apache.manifoldcf.crawler.connectors.meridio.ConnectionConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.