The code in Listing 11.19 is a sample Java implementation of the integration. It assumes that you’ve already generated the Java stub code from Enterprise WSDL using the WSC. It expects a file named
import.json to be located in the working directory. This is a JSON-encoded file containing an array of Contact records to update. Listing 11.20 is an example of the file format expected by the program.
The sample implementation uses a JSON library available at www.json.org/java.
import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.ArrayList;import java.util.List;import org.json.JSONArray; ...