cancel
Showing results for 
Search instead for 
Did you mean: 

Java Project as DC

Former Member
0 Kudos

Hi everyone,

I am trying to create a Java project as a DC that can be imported as a model in Web Dynpro. When I am experimenting by using local java project, I can import it with no problem into Web Dynpro as a model. But, when I am creating Java project as DC, I cannot export it to create JAR file and thus cannot be imported as model. Please help...

Thanks,

Johannes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

External Library DC is needed to encapsulate any jar file required. The entire source code and class file is required to be imported as described in the help section.

nilayghosh
Active Participant
0 Kudos

Hi Johannes,

Please refer to http://help.sap.com/saphelp_nw04s/helpdata/en/c3/321b410210ef6fe10000000a1550b0/content.htm

This is exactly what you are looking for. Quite an elaborate and well explained tutorial.

Regards

Nilay

Former Member
0 Kudos

Hi Nilay,

Thanks for the link. I tried, and it works, however, step 2 of the instruction seems to not making sense. It says:

2. Make the JavaBean model implementation of the Java DC available. To do so, switch to the Package Explorer view and choose the context menu entry Import on the node ® src/packages. In the next step, you can get the JavaBean model from the file system by choosing the path to the packages directory of the JavaBean in the wizard.

Why do we import the whole JavaBean source file into the Web Dynpro DC project? Wouldn't that complicate the maintenance of the Web Dynpro DC?

nilayghosh
Active Participant
0 Kudos

Hi Johannes,

You objective is to import the content of the Java project as a "Model" in a WD project. Out of the currently available options in WD, Java Bean is the only suitable one here. Now, to make it available as "Model" in WD, you need to make the "JavaBean model implementation" of the Java DC available to be published through the "Public Part" of your Java DC project. Once you publish the JavaBean Model implementation classes, the content of your DC based Java project become available to be used as Model inside the WD project.

Now, coming to your question, you are not actually importing the whole source code of your Java DC project. Rather, you are only importing the "JavaBean model implementation" classes. These acts like "proxy" classes and enables your WD project to communicate with the Java project.

Hope, this clarify your doubts to some extent. Please let me know if not.

Regards

Nilay

Former Member
0 Kudos

Hi Nilay,

Thanks for you answer. However, the step that I mentioned previously does really import all the source code onto the Web dynpro src/packages directory. I checked the directory folder, and all the Java Bean source codes and classes are there.

Regards,

Johannes