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 =
            restTemplate.exchange(BASE_URL + LIST_DOCUMENTS_BY_CUSTOMER,
                    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="#{document.name}"/>
                </p:column>

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

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