final String strFSObjType =
listItem.getMetaDataAttributeValue(SPConstants.FSOBJTYPE);
LOGGER.info("List ["+baseList.toString()+"] Item ["+listItemId
+ "] Attachments ["+strAttachmentValue
+"] FSObjType [" +strFSObjType+"]");
GetAttachmentCollectionResponseGetAttachmentCollectionResult res;
if ((strAttachmentValue != null && strAttachmentValue.equals("0"))
|| (strFSObjType != null && strFSObjType.equals("1"))) {
// Attachments not applicable if strFSObjType is 1 or List Item
// does not contain any attachments as per strAttachmentsValue.
res = null;
} else {
LOGGER.info("Calling web service to get Attachment for List ["
+ baseList.toString() +"] Item ["+listItemId
+ "] Attachments [" +strAttachmentValue
+ "] FSObjType [" +strFSObjType+"]");
res = stub.getAttachmentCollection(listName, listItemId);
}
if (res != null) {
final MessageElement[] me = res.get_any();
if (me != null) {
if (me.length > 0) {
if (me[0] != null) {
Iterator<?> ita = me[0].getChildElements();
while ((ita != null) && (ita.hasNext())) {