Dennis Bruhn

Get all contacts by account using soap

Discussion created by Dennis Bruhn on Jul 17, 2016



i am struggeling getting all contacts by account using the soap api.

I am using this as a query.



String query = "contacts.first_name = '%s' ";
query += "AND contacts.last_name = '%s' ";
query += "AND in (" +
   "SELECT contact_id from accounts_contacts " +
   "JOIN accounts ON ( = accounts_contacts.account_id) " +
   "WHERE = '%s')";
query = String.format(query, firstname, lastname, company);

I can use this query as the where clause direclty in the mysql cli and i get my expected result.




The error message i get is:

Get entry failed. Message: ; nested exception is: 
  org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: Ein Knoten wird in einem anderen Dokument verwendet als dem, von dem er erstellt wurde.
Get entry was successful! Response: 
15:09:11.548 [main] INFO  java.lang.Class - Cannot create contact {, last_name=Testsson, description=Test, title=Tester, first_name=Test, account=testing inc}