hashmap - Java - Getting a list of contacts using Infusionsofts API -
i'm using java , infusionsofts api list of contacts based on customer id. can't figure out way this. i'm using googles guava use multimap it's producing error:
org.apache.xmlrpc.common.xmlrpcextensionexception: serializable objects aren't supported, if isenabledforextensions() == false
i'm trying hashmap , i'm inserting "id" key , customer id value there's 1 entry in hashmap.
how can add parameters variable map contains:
["id",11111]
["id",22322]
["id",44444]
list parameters = new arraylist(); parameters.add(app_id); parameters.add(table_name); parameters.add(limit); parameters.add(pagenumber); hashmap<string, integer> map = new hashmap<string, integer>(); for(int customerid : customerids){ map.put("id", customerid); } //problem here parameters.add(map); //this problem, need add ["id", customerid] multiple //times customerid being different since there's hashmap //there's 1 entry in map string[] fields = {"email","firstname"}; parameters.add(fields); object[] contacts = null; try{ contacts = ( object [] ) client.execute("dataservice.query",parameters); }catch(xmlrpcexception e){ e.printstacktrace(); } (int = 0; < contacts.length; i++) { map contact = (map) contacts[i]; system.out.println(contact+"\n\n"); }
Comments
Post a Comment