cancel
Showing results for 
Search instead for 
Did you mean: 

Which MDM Java APIs should I use?

Former Member
0 Kudos

Hello

I'm planning to use MDM 5.5 Java API to get data from MDM Server.

I've read several blos below.

/people/udi.katz/blog/2005/07/17/mdm-connectivity-to-java-application

/people/andreas.seifried/blog/2006/03/26/performing-free-form-searches-with-mdm-java-api

/people/udi.katz/blog/2005/08/21/retrieving-data-from-mdm-server-using-the-mdm-java-api

/people/walter.kahn/blog/2005/10/27/mdm-55-api-tips-and-tricks--measurement-fields

But I'm still confused about which way I shoud chose to connect with servers.

Some blog showed the codes for connceting

-


catalogData.Login(SERVER, PORT, USER, PASSWORD, REGION_TAG, MIN_CONNECTIONS, MAX_CONNECTIONS,TIMEOUT,LOG_FILE);

System.out.println("Catalog logged in.");

measurementManager = catalogData.GetMeasurements();

-


The others showd below

-


//get the context

Context ctx = new InitialContext();

//lookup in the JDNI to get the connection factory class

IConnectionFactory connectionFactory =

(IConnectionFactory)ctx.lookup("deployedAdapters/MDMEFactory/shareable/MDMEFactory");

//Get Connction Spec to set connection properties

IConnectionSpec spec = connectionFactory.getConnectionSpec();

//Set Connection Properties

spec.setPropertyValue("UserName",USER);

spec.setPropertyValue("Password",PASSWORD);

spec.setPropertyValue("Server",SERVER);

spec.setPropertyValue("Port",PORT);

spec.setPropertyValue("RepositoryLanguage",REGION_TAG);

//Get the Connection

IConnection connection = connectionFactory.getConnectionEx(spec);

//Retrieve Native interface

INative nativeInterface = connection.retrieveNative();

//Get the CatalogData the physical connection

catalogData = (CatalogData) nativeInterface.getNative(CatalogData.class.getName());

-


I don't know which way(APIs) I should chose.

Would you let me knouw and explain about these APIs.

Regards.

Koji

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You will use second snippet if your application runs within NW WebAS context (either in Portal/WebDynpro or an EJB) and use the first method if your application is not based on any of them, meaning, a standalone java application or a web application on non SAP AS.

HTH

--

Venkat

Former Member
0 Kudos

Hi Venkat,

Could tell me where I can find the package com.sapportals.connector? Does it exist in a deployable form (.SCA or .SDA)? Because our system (NW 7.0 (2004s) SP9) does not contain it and we need it!

Regards,

Peter

Answers (0)