From your message I can see that, you are using a “doucment” with 2 records in it and trying to loop over!!.. You cannot loop over a document, create a documentList and provide this document list to ur loop as input array and it works.
for more information, refer to the developer guide on how to use loop, FYI… Loops can be used on StringList, DocList, etc…
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB