while(digitalAssetIterator.hasNext())
{
RemoteAttachment remoteAttachment = (RemoteAttachment)digitalAssetIterator.next();
logger.info("digitalAssets in ws:" + remoteAttachment);
FormEntryAssetVO newAsset = new FormEntryAssetVO();
newAsset.setContentType(remoteAttachment.getContentType());
newAsset.setAssetKey(remoteAttachment.getName());
newAsset.setFileName(remoteAttachment.getFileName());
newAsset.setFileSize(new Integer(new Long(remoteAttachment.getBytes().length).intValue()));
byte[] bytes = remoteAttachment.getBytes();
InputStream is = new ByteArrayInputStream(bytes);
formEntryController.createAsset(newAsset, newFormEntry, is, newFormEntry.getId(), principal, db2);
}