cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Portal Service within a Java DC / J2EE library DC

Former Member
0 Kudos

Hello experts,

I have some problem with the following construct:

I developed a Java DC where I want to call a portal service like this:

ILDAPManagerService ldapMgrService = (ILDAPManagerService)PortalRuntime.getRuntimeResources().getService(ILDAPManagerService.KEY);

The Java DC is integrated within a "J2EE Server Component library" as Used DC

and this J2EE Server Component library will also be deployed via SDM.

Because the Java DC or the library DC is not a portal application (so there is no portalapp.xml). I do not know where put the reference, so that at runtime the portal service is called successfully.

I tried to put a reference within the provider.xml of the generated SDA-File like described here: https://forums.sdn.sap.com/click.jspa?searchID=146415&messageID=651616 but this did not help!

Does anybody know how to do it?

Thanks in advance.

Regards,

Enrico Lenk.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos

Hi Enrico,

What reference name are you using for ILDAPManagerService?

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hello Maksim,

ILDAPManagerService is referenced by an external JAR-File which I integrated into the DC-Construction via external Library DC. This JAR-File contains the Interface to use the service.

During Build- und Deploy-Time everything is OK, but at Run-Time it is not possible to call the portal service, because I do not know where to put the reference to the portal service (which is already deployed an running in portal).

Regards,

Enrico Lenk.

Former Member
0 Kudos

You need to figure out which portal application contains this jar. Then use the documentation found here: http://help.sap.com/saphelp_nw04/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm

Former Member
0 Kudos

Were our answers helpful?

Former Member
0 Kudos

Hello,

the problem is, that my project structure has no application-j2ee-engine.xml because it is a Java DC - Project. This project only has a provider.xml. I tried to put a reference for the portal service there but is did not work.

Nevertheless, your link, Pascal, was helpful for another problem....

Regards,

Enrico Lenk.

Former Member
0 Kudos

Java DCs have no deployable result, so you need a J2EE Library DC to deploy your Java code to your runtime systems. You should use the application-j2ee-engine.xml of this J2EE Library DC.

Former Member
0 Kudos

Yes that's right. I have this J2EE Library DC - Project in which the Java DC is integrated by "Used DC...". But the J2EE Library DC-Project also generates no

application-j2ee-engine.xml just the provider.xml.

Former Member
0 Kudos

You're right. The application-j2ee-engine.xml is only available in J2EE Enterprise Application DCs. In J2EE Library DCs you only have the provider.xml where you can define references to interfaces, libraries and services, but not applications.

Is it an option for you to switch to a J2EE Enterprise Application DC?

Former Member
0 Kudos

I am not sure if this works, because my scenario is to implement a Guided Procedures Background Callable Object (NetWeaver 2004s). I developed the scenario by using a How to guide and this guide says that I have to use Java DC.

But I think it is a good idea to try the J2EE Enterpise App DC.