File Download Using Rest Template

Iam using Rest Template and i have this method that fetchs customer documents ; in the response iam getting document Name as String and doc as byte

    public void customerDocuments() {
    ResponseEntity<List<Document>> listResponse =
                    HttpMethod.GET, null, new ParameterizedTypeReference<>() {
    documentsList = listResponse.getBody();

in the view i have a data table which shows the document name and a button to download the document iam getting

      <p:column headerText="Name">
                    <h:outputText value="#{}"/>

                <p:column headerText="Action">
                    <p:commandButton value="Download" ajax="false>
                        <p:fileDownload value="{document.doc}"/>

What am I doing wrong Any ideas on how can i achieve that. Thank you