Skip to Content
0
Oct 20, 2005 at 08:24 PM

BI Java SDK

96 Views

Hi, I am trying to make a DB connection using the tutorial:

"How To Use the BI Java SDK in a Portal iView" from NWDE

and I have 2 questions.

1.- the documentation say that I need to import the com.sap.portal.ivs.connectorservice_api.jar. This is already imported but the "import com.sapportals.portal.ivs.cg.ConnectionProperties; " remain with error.

where do I found the correct jar to import ?

2.- this is an example to connect with a bi_xmla system and retrieve the schemas

How can I modify it in order to connect to a bi_jdbc system and retrieve the tables?

IConnectorService connectorService;

IConnectorGatewayService connectorGatewayService;

IConnection connection;

try { connectorService = (IConnectorService) PortalRuntime .getRuntimeResources() .getService( IConnectorService.KEY);

connectorGatewayService = connectorService.getIConnectorGatewayService();

ConnectionProperties connectionProperties =

new ConnectionProperties( request.getLocale(), request.getUser());

connection = connectorGatewayService.getConnection( "AB5_XMLA", connectionProperties);

IBIOlap olap = ((IBIConnection) connection).getOlap();

List schemas = olap.getSchema();

Schema schema = null; for (int i = 0; i < schemas.size(); i++) { schema = (Schema) schemas.get(i);

response.getWriter().write( "schema: " + schema.getName() + "<br>"); } } catch (Exception e) { e.printStackTrace(); }

Regards.