cancel
Showing results for 
Search instead for 
Did you mean: 

EP-Web Dynpro-MDM : User Information

Former Member
0 Kudos

Hi,

I have got a scenario in which a Web Dynpro IView is created within EP which accesses MDM Repositories through MDM Java APIs.

Now, the question is "How to get the user information from Portal(user name, password) which I can pass on to MDM to get a connection?"

Regards,

Mausam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello:

Please check

/message/333573#333573 [original link is broken] thread

Greetinsg!

Alejandro

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mausam,

if you want to access the portal user info in runtime it means for me you do not use the MDM Connector framework. From my perspective, I would recommend to use the MDM 5.5. SP4 patch1 Connector framework (MDMJAVAAPI04_0.sca), and this was my impression reviewing your . When using the MDM Connector framework (running on J2EE Connector Framework), there is no need to explicitely retrieve the user info in runtime and to pass it to MDM 5.5 SP4 Java APIs (e.g. retrieving data from a repository).

Using the MDM Connector, the code looks simple (snippet only ...):



IConnection mdmConnection = null;

try {

	// get connection

	ConnectionProperties prop = new ConnectionProperties(context.getLocale(), context.getUser());
	IConnectorGatewayService connectorservice = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
	mdmConnection = connectorservice.getConnection(system, prop); // system is the portal system object system alias
		// Retrieve Native inteface
	INative nativeInterface = mdmConnection.retrieveNative();

	// Get the CatalogData the physical connection

	CatalogData catalog = (CatalogData) nativeInterface.getNative(CatalogData.class.getName());
			
	// execute some 5.5 SP4 APIs of CatalogData class 

	catalog. ...

} catch (Exception e) {

	Logger.CONNECTOR.warningT(location, Constants.MDM_CONNECTOR_ID + " class - error " + e.getMessage().toString());
	// always force closing the opened connection before leaving
	try {
		mdmConnection.close();
	} catch (Exception dm) {};
	// throw new exception, and leave
	throw new Exception(e);
}

// always force closing the opened connection before leaving

try {
	mdmConnection.close();
} catch (Exception dm) {};

// leave
return xxxx;

Does this help ?

Thank you.

Regards.

Laszlo.

Former Member
0 Kudos

Hi Laszlo,

Thanks a lot mate. I will surely try this one and inform you about the results.

Thanks and Regards,

Mausam