cancel
Showing results for 
Search instead for 
Did you mean: 

Semantic layer SDK : How to get a BusinessLayer object from retrieved .unx

Former Member
0 Kudos

Hello ,

We are using BOXI R4.1 and trying to access .unx universes through the api.

We can create a context, fetch an enterpriseSession, register the session to CmsSessionService, fetch a LocalResourceService, and retrieve a Universe from CMS . So far so good.

We get three files in the local folder. A .blx file with the business layer information, a .dfx file with the data foundation information and the connection shortcut file .cns.

Only the latter can be loaded with the LocalResourceService. For the other two files we get an UnsupportedOperationException.

Example:

lPath: c:\tmp\universes\retrieval-2013-11-21-15-05-19\MDR BIS Metadata.dfx
Exception in localService.load: c:\tmp\universes\retrieval-2013-11-21-15-05-19\MDR BIS Metadata.dfxmessage : csEX
java.lang.UnsupportedOperationException: csEX
        at com.businessobjects.connectionserver.ConnectionServer.getInstance(ConnectionServer.java:165)

Can anyone help out please.

Thanks,

Bernd

Accepted Solutions (1)

Accepted Solutions (1)

Terry_Penner
Advisor
Advisor
0 Kudos

Hi Bernd,

Thanks to Christian Ah-Soon, a developer on the UNX SDK for this answer.

Usually csEX error messages are caused by a missing
-Dbusinessobjects.connectivity.directory="D:\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer"
parameter in the VM.

(see BI SL Java SDK Dev Guide Troubleshooting section).

The workflow is indeed to first retrieve the universe from the CMS repository (CmsResourceService) then to load the business layer (LocalResourceService).

       // Retrieves the specified universe

       CmsResourceService service = context.getService(CmsResourceService.class);

      String path = service.retrieveUniverse(SOURCE_UNX_PATH, LOCAL_FOLDER, true);

        // Loads the business layer resource

       LocalResourceService service = context.getService(LocalResourceService.class);

       RelationalBusinessLayer businessLayer = (RelationalBusinessLayer) service.load(BLX_PATH);

Former Member
0 Kudos

Hi Terry,

Thanks!!

We define this property when calling the application (see below).

As I wrote above the .cns can be loaded. The loads for .blx and .dfx fail.

Bernd

if not defined JAVA_HOME set JAVA_HOME=C:\Program Files (x86)\Java\jre6

set CP=C:\boxir41client\SAP BusinessObjects Enterprise XI 4.0\SL SDK\java\sl_sdk.jar
set CP=%CP%;./BOXIScannerR2.jar;

set path=C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86;%path%


"%JAVA_HOME%"\bin\java  -Xmx1024m -Dbusinessobjects.connectivity.directory="C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer"  -classpath "%CP%" sl.samples.Sample1

pause

0 Kudos

Hi Bernd,

What is your installation directory?

From your previous mail, there are two paths:

set CP=C:\boxir41client\SAP BusinessObjects Enterprise XI 4.0\SL SDK\java\sl_sdk.jar

and

-Dbusinessobjects.connectivity.directory="C:\Program Files\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer"

If your install directory is C:\boxir41client\..., you should update it in the -Dbusinessobjects.connectivity.directory parameter (C:\boxir41client\SAP BusinessObjects Enterprise XI 4.0\dataAccess\connectionServer).

Regards

Former Member
0 Kudos

Thanks Christian!

This is a good point. I will check that.

Bernd

Former Member
0 Kudos

Christian,

Thanks again.

I now get the information.

regards,

Bernd

0 Kudos

Great

Note that in the BI 4.1 SP2 that has just been released, the SL Java SDK supports new objects:

context,custom properties, predefined filter, business layer view...

The object model diagrams:

http://help.sap.com/businessobject/product_guides/sbo41/en/sbo41sp2_slsdk_java_omd_en.zip

Regards,

Ch. Ah-Soon 

Former Member
0 Kudos

Thank you Christian!

Yes I saw that 4.1 SP2 is available since this week and we are in process to download and upgrade.

The other interesting thing for us in 4.1 SP2 is the SL RESTful web services addition to the RESTful sdks.

We will check what we can get out of this new SL RESTful interface.

Bernd

0 Kudos

Hi,

Correct, this new BI Semantic Layer REST Web Service allows you to directly create and run a query on top of a relational universe created with information design tool and published in a CMS repository.

This first version in 4.1 SP2 has some limitations:

- it does not support multidimensional universes

- it does not support advanced filter suach as database ranking

- It does not supports contexts and prompts, but this one is our priority list for the next version of this REST Web Service.

Regards,

Ch. Ah-Soon

Answers (0)