How to connect OSGi to SAP?

559 views Asked by At

I need to connect Adobe CQ5 (OSGi based CMS) to SAP server to get some information from SAP. I don't have access to SAP server, meaning I cannot install anything there.

According to what I've found out it's possible to connect Java application to SAP server using one of the following methods.

1) Through Web services
Unfortunately, it doesn't fit our needs because additional configuration on the server side is required.

2) Through SAP Java Connector
According to this page I can connect to SAP server using JCo without any configuration on the server side. http://help.sap.com/saphelp_nw04/helpdata/en/8b/912229a9e611d6b28f00508b6b8a93/content.htm

Here it is described how to install the SAP Java Connector http://help.sap.com/saphelp_nw04/helpdata/en/47/80f671ee6e4b41b63c0fe46bd6e4f8/content.htm
But it uses not only .jar but also some .dll. But AFAIK .dll is a Windows thing, OSGi knows nothing about .dlls.

So, how to connect OSGi to SAP server without additional SAP-side configuration? Is it possible to do it with SAP JCo? If yes, how?

1

There are 1 answers

1
vwegert On

It is possible to use the SAP JCo in an OSGi environment. Take a look at RCER - although that specific project is somewhat dormant now, I have provided some tools to bundle the JCo up as an Eclipse Plugin (which is little more than an OSGi bundle). You have to take some precautions thought so that the class loader is able to access the native library - you won't be able to get any communication going without that library. RCER uses fragments to add the platform-dependent library while the host plug-in contains the platform-independent jar.