iter = message.iterator();
if (iter != null) {
while (iter.hasNext()) {
Field<?> field = iter.next();
OMElement msgField = soapFactory.createOMElement(FIXConstants.FIX_FIELD, null);
msgField.addAttribute(soapFactory.
createOMAttribute(FIXConstants.FIX_FIELD_ID, null, String.valueOf(field.getTag())));
Object value = field.getObject();
if (value instanceof byte[]) {
DataSource dataSource = new ByteArrayDataSource((byte[]) value);
DataHandler dataHandler = new DataHandler(dataSource);