cancel
Showing results for 
Search instead for 
Did you mean: 

connecting MDM through Java APIs using WebDynpro.

Former Member
0 Kudos

Hello All,

I have connected to MDM using the MDM Java APIs. Now I want to call the same function in a WebDynpro(WD) application. But it fails to connect. Below is my code

In my WD Login page i have entered the following code (i have hardcoded the values passed iin the function)

int resultLogin = catalog.Login("INLD50042949A",2025,"admin","welcome","English [US]");

if (resultLogin != RC.RC_OK)

{

wdComponentAPI.getMessageManager().reportException("Not connected",true);

}

The control is going into the if condition. bcoz resultLogin !=0

But the same parameters work fine if i call this method from a normal Java standalone application (Without using WebDynpro)

Please help

Thanks

Suresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Are you using the same service pack MDM4j in java application classpath and webdynpro application?

Note : You may not be able to connect to MDM if you are not using the same service pack MDM4j file.

Former Member
0 Kudos

Hi Ramu,

Yes, I have copied the same jar file into the 'lib' folder of my WD project.

Former Member
0 Kudos

Hi Suresh,

Also undeploy any other MDM4j.jar file if you find in SDM and make sure that no version coflicts happening.

Regards,

Ramu

Former Member
0 Kudos

Hi Ramu,

Act there are no other versions of that jar in my workspace or class path. But one thing i could figure out was this is happeninig due to version problem. I have tried to put in the versions of all the things im using to write this prog. please have a look and let me know if something is wrong

Netweaver Developer Studio -->Version: 2.0.14 Build id: 200509270219

JDK (Local machine) -->1.4

MDM4J and other jars are taken from the SAP Market place so they are the latest version.

J2EE server to which Im connecting -->

Version: 1.4.2_11-b06

And one more thing is I have copied the MDM4J.jar to the lib folder and in the project properties I have added the same as external jars.

Thanks

Suresh

Former Member
0 Kudos

Hello:

How are you referencing the MDM4J.jar? Remember that webdynpros are server-sided. So one thing could be that it does compile correctly (since compilation is done on your computer, where the MDM4J is) but after deployment it won't find the jar.

is it on the Classpath or something on the Server? One piece of advice would be

1) Create a set of EJB with the business logic inside

2) Generate a webService with those EJB

3) Import the model on webDynpro based on the wsdl generated

You should use the MDM Connector for this, rather than the MDM4J.jar

Greetings

Alejandro

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks, it worked

Former Member
0 Kudos

Hi Suresh,

I got some difficulties in connecting to MDM through EP. I have posted my question to the following thread:

Thanks in advance for your help!

Regards,

Peter