demo code XPages & SAP

I am working on an demo app that is going to read data from SAP. I noticed some helpful code in AD404 Presentation – Extend your Social Business by integrating SAP Solutions

Java Code for Integration Bean:

import org.odata4j.consumer.ODataConsumer;
import org.odata4j.consumer.behaviors.BasicAuthenticationBehavior;
import org.odata4j.core.OEntity;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
public class GWWorkflow {
private ArrayList<OEntity> WorkflowSet = null;
public ArrayList<OEntity> getWorkflows() {
ODataConsumer c =
CESSING/”,new BasicAuthenticationBehavior(“super”,”password”));
this.WorkflowSet = new ArrayList<OEntity>();
for(OEntity workflow : c.getEntities(“WorkflowTaskCollection/?$format=xml”).execute()){
return this.WorkflowSet;

Java Bean needs to be added to “faces-config.xml” in NSF file


On the Xpage a DataTable with following settings is added:


Which then allows access to the bean with the following JavaScript Statement: