0
Javaのアプリケーションを注入ソフトで連絡先を作成しようとしていますが、応答に失敗しました。いつか私は、接続タイムアウトエラーが発生しました、いつかエラー596Javaでxml rpcサービスを使用してinfusionsoftで連絡先を作成するにはどうすればよいですか?
は私のコード例は、仲間の下にありました:
public static void addContact() {
try {
//Sets up the java client, including the api url
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setEnabledForExtensions(true);
config.setConnectionTimeout(60 * 1000);
config.setReplyTimeout(60 * 1000);
config.setServerURL(new URL(\"https://api.infusionsoft.com/\"));
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);
//The secure encryption key
String key = \"sdfsdfsdfsdfs34534534534534\";
/**
* ***********************************************
* *
* ADD CONTACT TO DATABASE *
* ***********************************************
*/
List parameters = new ArrayList();
Map contactData = new HashMap();
contactData.put(\"FirstName\", \"Java John\");
contactData.put(\"LastName\", \"Doe\");
contactData.put(\"Email\", \"[email protected]\");
parameters.add(key); //The secure key
//parameters.add(\"Contact\"); //The table we will be adding to
parameters.add(contactData); //The data to be added
//Make the call
Integer contactId = (Integer) client.execute(\"ContactService.add\", parameters);
System.out.println(\"Contact added was \" + contactId);
} catch (MalformedURLException ex) {
System.out.println(ex);
} catch (XmlRpcException ex) {
System.out.println(ex);
}
}
どのように私はソフトJavaでXMLRPCサービスを使用して点滴で連絡先を作成するのですか?私はコード例がありますか?