cancel
Showing results for 
Search instead for 
Did you mean: 

Web dynpro using a portal service

Former Member
0 Kudos

Hello All,

We are using the JDI.

We want to use a portal service DC from a web dynpro DC.

The web dynpro DC is part of a software component.

When the portal service is a local DC it is working fine (except failing later on the CBS build)

but when the service is part of a software component as well I get a runtime exception: a java.lang.NullPointerException.

The WD sharing reference I'm using is: PORTAL:sap.com/<dc service prefix>.<service name>

I assume that this is the right reference because without this exact phrase I get a java.lang.NoClassDefFoundError: com/sap/<name of service>

Does anybody know how to use a portal service that is part of software component?

Thanks a lot in advance, Adi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Adi,

Try the sharing reference with

PORTAL:sap.com/<ServiceParName>

I am using the same scenario, Except both the Service DC & WD DC are on NWDI instead of Local. What i did is I created Portal Application - Stand Alone DC which is used to create the Portal Service. Then in the WD DC, i added the Portal DC's API PP. Also gave Sharing Reference as mentioned to you above.

It should work.. Pls test and let me know.

Thanks,

Raags

Former Member
0 Kudos

Thanks Raags and Praveen M ,

The solution was to change the next code line in the service client code :

Idb_srv DB_Service = (Idb_srv) WDPortalUtils.getServiceReference(Idb_srv.KEY)

to:

Idb_srv DB_Service = (Idb_srv) WDPortalUtils.getServiceReference(""<PARFilename>.<service name>");

I found it on the next thread:

and it was actually Raags that provided the solution there.

Thanks, Adi.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Adi,

I assume that your portal service DC is working fine when it is a local DC(not on NWDI). So when you migrate is from local to NWDI its giving nullpoint exception.

I think its problem with migration, don't try to create dc again, I mean you have to copy total folder structure, so that you avoid manual creating of sharing references and adding as used DC. First create a project and copy everything from your local project except bin and .classpath.

let me know if this is not the answer you are looking for.

Regards

Praveen M