cancel
Showing results for 
Search instead for 
Did you mean: 

How to get trusted connection using MDM Java API - MDM 7.1

Former Member
0 Kudos

Hi All,

I have developed a webdynpro application which I am launching on UWL task. I am able to launch the application and read the data from the uwl task and do activities.

I fetch the user and password from the MDM reference system, we created in Portal with alias.

Below is the code how I create a usercontext.

Issue :

Users will not know the mdm password. So it is not possible for them to set in the system individually.

usrCtxt = new UserSessionContext(mdmServer, mdmRepository, mappedUserId);

SessionManager.getInstance().createSession(usrCtxt,SessionTypes.USER_SESSION_TYPE, mappedUserPwd);

Is there any other way I can create a usercontext without password?

I came across trusted connection. It is set on our Portal and MDM. It is working fine for the wdconfig projects.

But how do I create trusted connection using APIs in my webdynpro project? Could you please help me with codes?

Regards,

Durai

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

For [Trusted connections|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09eaa01-f941-2c10-8d88-be7e05a85c47?QuickLink=index&overridelayout=true]

follow the mentioned link.

By default the MDM Java API opens a socket connection to the MDM server at port number 20005. If the MDM server is behind a firewall, the necessary permissions should be provided. A connection to the MDM server can also be a trusted connection. Trusted connections are configured through configuration files on the MDM server.

http://help.sap.com/saphelp_nwmdm71/helpdata/en/5e/87ba37c9134ad586ccebc558aa5e8c/content.htm

regards,

Abhishek

Edited by: Abhishek Biwal on Dec 8, 2011 2:02 PM

Answers (1)

Answers (1)

Former Member
0 Kudos
Former Member
0 Kudos

Thanks Ravi and Abhishek.

I will try the options and quickly get back . But I don't see options to close these sessions. I am using

 SessionManager sessionManager = SessionManager.getInstance(); 
sessionManager.destroySession(usrCtxt,SessionTypes.USER_SESSION_TYPE); 
sessionManager.destroySession(usrCtxt,SessionTypes.REPOSITORY_SESSION_TYPE);
essionManager.destroySessions(usrCtxt); 

But if I use the trusted connection, I dont have the usrCtx (UserContent).

Any ideas on closing trusted connections?

Regards,

Durai

Former Member
0 Kudos

I am facing a problem in setting the repository identifier. I am fetching the properties like repository name, servername from the portal reference system i created. But how do I get the "dbservername"? It is not fixed in DEV, QA and PRD systems.

RepositoryIdentifier repository = new RepositoryIdentifier( mdmRepository,"DM1",DBMSType.ORACLE);

Any ideas plz?

Regards,

Durai

Former Member
0 Kudos

Hello,

For closing the trusted connection please check the below link

[Closing Trusted Connection|http://help.sap.com/saphelp_mdm550/helpdata/en/46/28dac6b8bc14dbe10000000a155369/content.htm]

You can also the [MDM Security Guide|http://help.sap.com/saphelp_mdm71/helpdata/en/4d/bf9ac206ec288de10000000a42189e/MDMSecurity71.pdf] page 23 for more details.

For getting the dbservername you can use com.sap.mdm.server getName()

for any java help you may use [Java Doc Help Site|http://help.sap.com/javadocs]

Regards,

Abhishek

Edited by: Abhishek Biwal on Dec 8, 2011 4:38 PM

Former Member
0 Kudos

Hi Saran,

Using this you can get DBMS details,

com.sap.mdm.server

Class DBMSProperties

java.lang.Object

extended bycom.sap.mdm.server.DBMSProperties

public class DBMSProperties

extends Object

DBMSProperties specifies a DBMS server.

For closing session this should help;

http://help.sap.com/saphelp_mdm550/helpdata/en/46/28dac6b8bc14dbe10000000a155369/content.htm

Thanks,

Ravi

Former Member
0 Kudos

Thanks Ravi and Abhisek.

Instead of reading each and every property on the MDM server, I have included the mdm WD search component interface (invisible) in my webdynpro application and got the usersessioncontext from the repository bean. Using this usersessioncontext I am able to do all the required api calls.

Regards,

Saravanan