Package com.sforce.ws

Examples of com.sforce.ws.ConnectorConfig


        if (logger.isDebugEnabled()) {
            if (partnerConnection == null) {
                return;
            }

            ConnectorConfig config = partnerConnection.getConfig();
            StringBuffer strBuff = new StringBuffer("Executing connection with config:\n");
            strBuff.append(" username='" + config.getUsername() + "'").append("\n serviceEndpoint='")
                    .append(config.getServiceEndpoint() + "'").append("'")
                    .append("\n authPoint='" + config.getAuthEndpoint() + "'").append(config.getAuthEndpoint())
                    .append("'").append("\n conn timeout='").append(config.getConnectionTimeout()).append("'")
                    .append("\n read timeout='").append(config.getReadTimeout()).append("'").append("\n proxy='")
                    .append(config.getProxy() != null ? config.getProxy().toString() + "'" : "n/a").append("'")
                    .append("\n metadataUrl='").append(getMetadataServerUrl()).append("'").append("\n orgId='")
                    .append(getOrgId()).append("'");

            Map<String, String> headers = config.getHeaders();
            if (Utils.isNotEmpty(headers)) {
                Set<String> keys = headers.keySet();
                for (String key : keys) {
                    strBuff.append("\n ").append(key).append("='").append(headers.get(key)).append("'");
                }
View Full Code Here


public class Connector {

  public static final String END_POINT = "http://localhost:8080/services/Soap/u/31.0";

  public static PartnerConnection newConnection(String username, String password) throws ConnectionException {
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    return newConnection(config);
  }
View Full Code Here

        }
    }

    public ExecuteAnonymousResultExt executeAnonymous(String code, LogInfo[] logInfo, Connection connection,
            int readTimeout) {
        ConnectorConfig connectorConfig = connection.getConnectorConfig();
       
        boolean orig_traceMsg = connectorConfig.isTraceMessage();
        boolean orig_prettyPrintXml = connectorConfig.isPrettyPrintXml();
        String orig_sessionId = connectorConfig.getSessionId();
        String orig_serviceEndpoint = connectorConfig.getServiceEndpoint();
        int orig_readTimeout = connectorConfig.getReadTimeout();
       
        connectorConfig.setTraceMessage(true);
        connectorConfig.setPrettyPrintXml(true);
        connectorConfig.setSessionId(connection.getSessionId());
        connectorConfig.setServiceEndpoint(connection.getApexServiceEndpoint(connection.getServiceEndpoint()));
        connectorConfig.setReadTimeout(readTimeout);
       
        SoapConnection apex = null;
        try {
            apex = Connector.newConnection(connectorConfig);
            apex.setDebuggingHeader(logInfo, LogType.None);
            return new ExecuteAnonymousResultExt(apex.executeAnonymous(code), apex.getDebuggingInfo());
        } catch (ConnectionException e) {
            ExecuteAnonymousResult er = errorExecuteAnonymousResult(connectorConfig, e);
            ExecuteAnonymousResultExt erx = new ExecuteAnonymousResultExt(er, apex.getDebuggingInfo());
            DebuggingInfo_element dbi = new DebuggingInfo_element();
            dbi.setDebugLog(e.getMessage());
            erx.setDebugInfo(dbi);
            return erx;
        } finally {
            connectorConfig.setTraceMessage(orig_traceMsg);
            connectorConfig.setPrettyPrintXml(orig_prettyPrintXml);
            connectorConfig.setSessionId(orig_sessionId);
            connectorConfig.setServiceEndpoint(orig_serviceEndpoint);
            connectorConfig.setReadTimeout(orig_readTimeout);
        }
    }
View Full Code Here

public class Connector {

  public static final String END_POINT = "http://localhost:8080/services/Soap/T/31.0";

  public static SoapConnection newConnection(String username, String password) throws ConnectionException {
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    return newConnection(config);
  }
View Full Code Here

public class Connector {

  public static final String END_POINT = "https://test.salesforce.com/services/Soap/u/29.0";

  public static PartnerConnection newConnection(String username, String password) throws ConnectionException {
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    return newConnection(config);
  }
View Full Code Here

public class Connector {

  public static final String END_POINT = "https://na3.salesforce.com/services/Soap/s/30.0";

  public static SoapConnection newConnection(String username, String password) throws ConnectionException {
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    return newConnection(config);
  }
View Full Code Here

public class Connector {

  public static final String END_POINT = "https://autodesk--ADSKSFDEV.cs12.my.salesforce.com/services/Soap/m/29.0";

  public static MetadataConnection newConnection(String username, String password) throws ConnectionException {
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    return newConnection(config);
  }
View Full Code Here

  }

  private Boolean login() {
    password = decryptPassword(password);
    ConnectorConfig config = new ConnectorConfig();
    config.setUsername(username);
    config.setPassword(password);
    config.setAuthEndpoint(END_POINT);
    config.setServiceEndpoint(END_POINT);
    try {
      conn = Connector.newConnection(config);
      LoginResult loginResult = conn.login(username, password);
      if (loginResult.getPasswordExpired()) {
        throw new WormholeException("Error Expired Password",
View Full Code Here

TOP

Related Classes of com.sforce.ws.ConnectorConfig

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.