cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Portal UME from Webservice

Former Member
0 Kudos

Hi,

I'm trying to write a webservice which is creating a new portal-user.

For this I need to access the portal-UME, and I thought it can be accessed using the package com.sap.security.api. Is this really correct?

But I do not know how to refrence to this package. I tried setting up an "External Library DC" and put the jar-file (com.sap.security.api.jar) in there, then adding the jar-file to the public part of that library-DC.

But how can I use this package in the weservice-DC? I tried adding it as an external JAR to the build-path (properties->Java Build Path->Add jars...), but building the DC resulted in an build-error ("com/sap/security/api/UMException).

Thank You very much for Your help, regards

Jan Hempel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jan,

you need to add a reference to the usermanagement dc to your web service dc (Add it to the "Used DCs" Folder).

I'm not a hundred percent sure, but I think its name is engine.security.facade

best regards,

Martin

Former Member
0 Kudos

Hi Martin,

thanks a lot for Your answer! I'm a little bit confused on this topic, so let me ask You one thing first:

Is it correct that it followed the wrong approach by setting up an external-library-DC and putting the com.sap.security.api.jar in there to use it in my EJB-Webservice?

I understand that instead I should add an reference to an existing DC called "engine.security.facade" (or similar) to my Webservice. The problem is: I can't find anywhere...

When I choose "DC Metadata->Used DC->Add used DC..." I see the active and inactive DCs. In the inactive DC-tab there are only my own DCs, on the actice-DC-tab I see all the "standard" DCs (SAP_JTECHS, SAP_BUILDT, SAP-J2EE). Underneath these DCs I can't find any reference like "engine.security.facade".

Do I maybe have to add another software-component usage-dependency in the SLD?

Am I on the right way here, or is there still something wrong in my approach?

Thanks again, regards

Jan Hempel

Former Member
0 Kudos

Hi Jan,

its correct that you should add a referenced dc to your dc instead of adding a jar file to the build path of the project.

Unfortunately I don't have a NW04 IDE installed, therefore I can't check the right DC name. Can you check if you find a dc named com.sap.security.api.sda ?

regards,

Martin

Former Member
0 Kudos

Hi Martin,

thanks again! I found "com.sap.security.api.sda" and I added this as an used-dc to my webservice.

Problem now: when I build the DC I get an error:

ERROR: invalid entity reference found:

public part "client" of xyz.com/EDILOGWS(xyz.com_EDILOG_WD_APP_1)" has illegal

reference to public part "com.sap.security.api" of

"xyz.com/EDILOGLIB". <b>No dependency is declared from

"xyz.com/EDILOGWS(xyz.com_EDILOG_WD_APP_1)" to the

referenced public part or component.

</b>

I declared the dependency in SLD for the software-components (my SC is using the SAP-J2EE software-component), but where can I define a dependency between the DCs?

Regards

Jan

Former Member
0 Kudos

Hi Jan,

I never got this error, so I don't know the reason for it. Can you check your .dcdef file on the file system. It should include now an entry like this:

<dependency>

<dc-ref>

<name>com.sap.security.api.sda</name>

<vendor>sap.com</vendor>

</dc-ref>

<at-build-time/>

<at-deploy-time/>

<at-runtime qualifier=""/>

</dependency>

If there is also a public part reference, like this:

<pp-ref>default</pp-ref>

remove this line and try again...

Former Member
0 Kudos

Hi Martin,

I checked the .dcdef file and it looks like You described.

You helped me a lot already, maybe somebody else has a clue how to define the dependency beetween the development-components.

Regards

jan

Former Member
0 Kudos

ok, problem solved:

the error I got ("no dependency declared...", see above) did not arise from assigning the com.sap.security.api.sda as a used DC. Instead I previously had addded it by mistake as an entity refrence to the public part of my component.

Regards

Jan Hempel

Answers (0)