Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
steffen_ulmer
Employee
Employee
0 Kudos

Hi,

since I was struggeling a little bit with using the MDM Java API within a Web Dynpro Development component I'm writing this Blog to give you a description HOW TO USE THE MDM JAVA API WITHIN A WEB DYNPRO DEVELOPMENT COMPONENT.

 In the past and with older NW release you can use the MDM Java API in a very easy way by defining the reference to the runtime within your Web Dynpro project itself. For the local compilation you just had to add the Libraries to your local build path and for the runtime you had the hard reference to the connector itself which was deployed on the server. The following picture shows you the OLD way:

USING MDM Java API : The old way within a Web Dynpro project

(see also: Referencing the MDM Java API during development and runtime  (Referencing the MDM Java API during development and runtime))

Java Build Path for local compilation

Hard reference for the Runtime on the server

USING MDM Java API:  IN A DEVELOPMENT COMPONENT (NWDI or Local Development)

Since NW CE7.1 the above mentioned way is deprecated and in CE7.1.1 it's even not possible at all! Because of that you must use the following way of using the MDM Java APi within your Web Dynpro Application:

1.  Create a new Development Component. Type: External Library<br />Use any name you want. Maybe it’s a good idea to use something like "<xy>/extlib/mdm". In my example I used "upod/externallibs/mdm"</p><p>!https://weblogs.sdn.sap.com/weblogs/images/63702/MDMJavaAPI_NewWay_1.JPG|height=469|alt=|width=426|s...!</p><p>2. Add MDM jar files to the External Library project below folder libraries:

You can do that by drag & drop from your Windows Explorer. Just imagine that you need to add the correct version in respect to your current MDM Server version.

3. Add puplic parts to your External Library DC<br />Add two puplic parts for COMPILATION and ASSEMBLY and add all the jar files to both public parts (as archive). 

4. Build and deploy the External Library DC

5. Switch to your Web Dynpro DC and define a new dependency

6. Reload your Web Dynpro DC and ensure that you have the mdm.jars in you build path automatically by defining these dependencies

!https://weblogs.sdn.sap.com/weblogs/images/63702/MDMJavaAPI_NewWay_5.JPG|height=340|alt=|width=614|s...!</body>

1 Comment