return buildInterchange("D", "03B", messageTypes, builder);
}
public static UNEdifactInterchange41 buildInterchange(String versionNum, String releaseNum, Class<?>[] messageTypes, MessageBuilder messageBuilder) {
UNEdifactInterchange41 interchange41 = messageBuilder.buildMessage(UNEdifactInterchange41.class);
UNB41 unb = interchange41.getInterchangeHeader();
List<UNEdifactMessage41> messages = interchange41.getMessages();
interchange41.setInterchangeDelimiters(messageBuilder.getDelimiters());
unb.getSyntaxIdentifier().setId("UNOW"); // UNOW is UTF-8.... as encoded above
unb.getSyntaxIdentifier().setCodedCharacterEncoding("UNOW"); // UNOW is UTF-8.... as encoded above
messages.clear();
for (Class<?> messageType : messageTypes) {
UNEdifactMessage41 message41 = messageBuilder.buildMessage(UNEdifactMessage41.class);
Object messageInstance = messageBuilder.buildMessage(messageType);