Failed to add multiple scheme ID with value in PartyIdentificationType for UBL 2.1 version 9.0.0
soowc opened this issue · comments
Hi,
Sorry for disturb. Encountered issue when wanted to add multiple ID in PartyIdentificationType.
Checked and there is no addID in PartyIdentificationType library. Am I doing correctly on this?
final PartyIdentificationType aIdentification = new PartyIdentificationType();
IDType aID = new IDType();
aID.setSchemeID("TIN");
aID.setValue("TINNo1");
IDType bID = new IDType();
bID.setSchemeID("NRIC");
bID.setValue("NRICNo1");
aIdentification.setID(aID);
aIdentification.setID(bID);
System.out.println("aIdentification ::: "+aIdentification.toString());
Output:
id=[IDType@0x1ed4004b: schemeAgencyID=null; schemeAgencyName=null; schemeDataURI=null; schemeID=NRIC; schemeName=null; schemeURI=null; schemeVersionID=null; value=NRICNo1]]
Hi. Don't call setID
but addID
.
Edit: You can only have one ID
element inside PartyIdenticiation
- the XSD doesn't allow more.
Hi,
Thank you for clarifying.
The sample output I received, which included multiple rows of ID in Party Identification, prompted the question.
This clarification has been immensely helpful, and I'm delighted on the library is working smoothly for me. Thank you!