Accounting API Developer's Reference
Using the API with Web Services

Using the API with Web Services

If you are integrating with FinancialForce through a platform/language not hosted on the Force.com platform, such as Java or .Net, you can make use of the FinancialForce Web Services. These take the same shape and form as their Apex equivalents except that they do require authentication via the standard Force.com Partner Web Service.

As is the case with other Force.com Web Services, the session ID returned by the login() operation must be present in all FinancialForce Web Service calls.

The steps are as follows:

  1. Read the appropriate sections of the Force.com Web Services API Developer's Guide before you start. In particular, the "Security and the API" and "Login()" topics.
  2. Download the Salesforce Enterprise WSDL file to a place accessible to your development environment - Setup | Develop | API.
  3. Call the login() operation to obtain the sessionId, as in the example below. See the Force.com Web Services API Developer's Guide for more examples. Salesforce checks the IP address from which the client application is logging in, and blocks logins from unknown IP addresses. If you get a login error, you must append your security token to the end of your password in order to log in. See "Security Tokens" below for more information.
  4. Pass the sessionId to each subsequent call to the FinancialForce API, as shown in the example below.

Example (C#)

SforceService service = new SforceService();
String sessionId = service.login("user",�password").sessionId;
CODAAPISalesInvoice_7_0Service salesInvoiceService = new CODAAPISalesInvoice_7_0Service();
salesInvoiceService.SessionHeaderValue = new SessionHeader();
salesInvoiceService.SessionHeaderValue.sessionId = sessionId;

Security Tokens

When accessing Salesforce from outside of your company�s trusted networks, you must append a security token to your password to log in to the API or a desktop client.

To reset your security token:

  1. Navigate to Setup | Personal Setup | My Personal Information | Reset My Security Token.
  2. Click Reset Security Token.

For security reasons, your security token is delivered to the email address associated with your account.

Viewing FinancialForce API Apex Classes

To view a list of all the relevant Apex classes:

  1. Click Setup | Develop | Apex Classes.
  2. From the View field, select the "FinancialForce API Classes" option. A list of all relevant Apex classes is displayed.
  3. Click the relevant WSDL link to display its Web Services Definition Language (WSDL) document.