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:

package com.ibm.chi;
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 =
ODataConsumer.create(“http://9.153.165.205:8000/sap/opu/sdata/sap/WFDECISIONTASKPRO
CESSING/”,new BasicAuthenticationBehavior(“super”,”password”));
this.WorkflowSet = new ArrayList<OEntity>();
for(OEntity workflow : c.getEntities(“WorkflowTaskCollection/?$format=xml”).execute()){
this.WorkflowSet.add(workflow);
}
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:

About these ads

Born in Holland, current country of residence is Sweden. IBM Notes Consultant since 1997. Main focus is Xpages development. Other interests: computers, motorcycles, music (bass guitar) & cooking.

Tagged with:
Posted in XPages

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Introduction
I am Patrick Kwinten. I am a IBM Notes Domino Product Specialist since 1996. With this blog I am trying to give my contribution to the community.
.
OpenNTF
Follow my projects on OpenNTF. Below are some examples:

Categories
RSS Feed
Follow

Get every new post delivered to your Inbox.

Join 201 other followers

%d bloggers like this: