Assumption and Design Input/Output
Assuming the
- Document of
ValuesInput[] are the input, which are same as Values[] the output.
- Document of
columnValue under Document of ValuesInput[] has string variable named additionalString (which it would be makes no sense if there are no variable inside/under the Document)
So overall would be like this:

Of course you could generate the code after designing the input/output by right-clicking your mouse and generate code -> For implementing this service.

But, instead of using the generated code, I'm trying to give an example with IDataMap which you can find in webMethods Javadoc com.softwareag.util.IDataMap. Which is very convenient to use
IDataMap
IDataMap combines the functionality of IData, IDataCursor, IDataUtil,
and IDataFactory. IDataMap implements the java.util.Map interface from
the Java Collections Framework, providing a familiar and simple
interface. IDataMap expands the Map interface, adding getAs<Type>
methods, which convert the returned value to a specific type.
And it goes like this:
public static final void mapDocument(IData pipeline) throws ServiceException
{
// pipeline input by IDataMap
IDataMap pipelineMap = new IDataMap(pipeline);
// extracting Values input into IData[] variable array
IData[] ValuesInput = pipelineMap.getAsIDataArray("ValuesInput");
// Initiate OutDoc.Values length based on ValuesInput length
IData[] Values = new IData[ValuesInput.length];
// OutDoc.Values
// Iterate and copying all ValuesInputDoc into OutDoc.Values
for (int i = 0; i < ValuesInput.length; i++)
{
Values[i] = IDataUtil.clone(ValuesInput[i]);
}
// OutDoc
IData OutDoc = IDataFactory.create();
IDataMap outDocMap = new IDataMap(OutDoc);
// OutDoc IDataMap
String TableName = "TableName is Never assigned";
outDocMap.put("TableName", TableName);
// OutDoc.Values
outDocMap.put("Values", Values);
// Wrap the OutDoc into pipeline
pipelineMap.put("OutDoc", OutDoc);
}
And the result
