How are you getting document (the parent of PkgList)? It would appear that this is where the problem lies. As long as Loop sees a documentList type for PkgItem, it won’t care whether it has one item or more. However, if it does not see a documentList type for PkgItem, that could be a problem.
If you are creating document from something like xmlNodeToDocument, be sure to set the “arrays” input variable to PkgItem.
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB