class PayloadCreator {

    public InputStream createPayload(WpsProcessConfiguration configuration, WFSDataType resultType) throws IOException
    {
        Execute executePayload = new Execute();
        executePayload.setService("WPS");
        executePayload.setVersion("1.0.0");

        CodeType identifier = new CodeType();
        identifier.setValue(configuration.getProcessIdentifier());
        executePayload.setIdentifier(identifier);

        DataInputsType inputs = new DataInputsType();
        Set<String> serverColumns = getServerColumns(configuration);
        for (Entry<String, String> entry : configuration.getInputs().entrySet())
        {
            if (serverColumns.contains(entry.getKey()))
            {
                List<InputType> input = generateInput(entry.getKey(), entry.getValue());
                inputs.getInput().addAll(input);

                if (StringUtils.equals("TYPENAME", entry.getKey()))
                {
                    resultType.setTypeName(input.get(0).getData().getLiteralData().getValue());
                }
            }
        }
        executePayload.setDataInputs(inputs);

        ResponseFormType response = new ResponseFormType();
        OutputDefinitionType outputDefinition = new OutputDefinitionType();

        CodeType outputIdentifier = new CodeType();
        outputIdentifier.setValue("OutputData");
        outputDefinition.setIdentifier(outputIdentifier);
        response.setRawDataOutput(outputDefinition);

        executePayload.setResponseForm(response);

        return serializeToStream(executePayload);
    }

}