Package com.sforce.soap.partner

Source Code of com.sforce.soap.partner.Connector

package com.sforce.soap.partner;

import com.sforce.ws.ConnectorConfig;
import com.sforce.ws.ConnectionException;

/**
* Generated by ConnectionCodeGenerator.java. Please do not edit.
*/
public class Connector {

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

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

  public static PartnerConnection newConnection(ConnectorConfig config) throws ConnectionException {
    if (config.getAuthEndpoint() == null) {
      config.setAuthEndpoint(END_POINT);
    }
    if (config.getServiceEndpoint() == null) {
      config.setServiceEndpoint(END_POINT);
    }
    return new PartnerConnection(config);
  }
}
TOP

Related Classes of com.sforce.soap.partner.Connector

TOP
Copyright © 2018 www.massapi.com. 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.