Hi, all !
Is following workflow possible:
1) External system: calling via soap ofbiz service:
2) ofbiz service code(i'd like it to create new person):
----------------------
public static Map createPerson(DispatchContext dctx, Map context) {
Map result = ServiceUtil.returnSuccess();
Map newContext = new HashMap(context);
Map loginResult = createPerson(dctx, newContext);
if (loginResult.get(ModelService.RESPONSE_MESSAGE).equals(
ModelService.RESPOND_SUCCESS)
) {
result.put("result", Boolean.TRUE);
} else {
result.put("result", Boolean.FALSE);
}
return result;
}
----------------------
All necessary data is passed through soap call (it is available in context).
I have following problem: inside "createPerson" rows into two table are inserted: Party and Person. New entry in Party is created successfully, but when new entry in Person is inserted following error occures:
java.sql.SQLException: Integrity constraint violation - no parent PERSON_PARTY table: PARTY in statement [INSERT INTO PERSON (PARTY_ID, LAST_NAME, FIRST_NAME, MIDDLE_NAME, PERSONAL_TITLE, SUFFIX, NICKNAME, MEMBER_ID, GENDER, BIRTH_DATE, HEIGHT, WEIGHT, MOTHERS_MAIDEN_NAME, MARITAL_STATUS, SOCIAL_SECURITY_NUMBER, PASSPORT_NUMBER, PASSPORT_EXPIRE_DATE, TOTAL_YEARS_WORK_EXPERIENCE, COMMENTS, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]
Is my way of calling createPerson acivity right and whats the problem.
Thanks in advance.
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users